GithubHelp home page GithubHelp logo

几条建议 about pkuseg-python HOT 5 OPEN

lancopku avatar lancopku commented on May 4, 2024 7
几条建议

from pkuseg-python.

Comments (5)

yangbisheng2009 avatar yangbisheng2009 commented on May 4, 2024

如果目标是要打造工业级强度的分词工具,那么:

1、按照 PEP8 规范把代码整理一下;
2、不建议支持 Python 2,Python 2 都要淘汰了,这个精力花得不值;
3、模型文件在 GitHub (可以参考 distributing-large-binaries)或者 s3 上放一份;
4、加载模型的时候给出提示(输出相应的日志,而非直接打印到控制台),这样用户可以知道模型什么时候加载完毕,否则会误以为分词本身用了很长时间;
5、和其他分词工具(如 hanlp, LTP 等)进行更全面的对比,以及需要增加关于性能的基准测试(比如每秒能处理多少词);
6、对标点符号、数字等的特殊处理;
7、增加 C++/Java 接口(假如仅仅是做推断的话,其实更建议 CRF 的部分用 C++ 重写)

我也提了和你一样的建议,和hanlp、ltp做对比,不过作者把我的issue都close了。。。。

from pkuseg-python.

jingjingxupku avatar jingjingxupku commented on May 4, 2024

如果目标是要打造工业级强度的分词工具,那么:

1、按照 PEP8 规范把代码整理一下;
2、不建议支持 Python 2,Python 2 都要淘汰了,这个精力花得不值;
3、模型文件在 GitHub (可以参考 distributing-large-binaries)或者 s3 上放一份;
4、加载模型的时候给出提示(输出相应的日志,而非直接打印到控制台),这样用户可以知道模型什么时候加载完毕,否则会误以为分词本身用了很长时间;
5、和其他分词工具(如 hanlp, LTP 等)进行更全面的对比,以及需要增加关于性能的基准测试(比如每秒能处理多少词);
6、对标点符号、数字等的特殊处理;
7、增加 C++/Java 接口(假如仅仅是做推断的话,其实更建议 CRF 的部分用 C++ 重写)

我们会考虑把您的这些建议加进我们的下一个版本的工具包里。另一方面,除了改进我们的核心功能,我们也正在积极筹备更多领域的预训练语料供大家下载使用。非常感谢您的建议!

from pkuseg-python.

wqh0109663 avatar wqh0109663 commented on May 4, 2024

为什么我觉得你这个好慢啊 我开了十个线程等了半天才运行完

from pkuseg-python.

xxllp avatar xxllp commented on May 4, 2024

python代码需要优化的太多,还是建议用C++啥的重写下

from pkuseg-python.

ouening avatar ouening commented on May 4, 2024

为什么我觉得你这个好慢啊 我开了十个线程等了半天才运行完

这个慢的一度让自己感觉程序是不是默默死掉了,跑了老半天才完成了几轮,没有hanlp快

from pkuseg-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.