Hi, this code is easy to use!

Please check the src/ for all hyper-parameter and IO settings.

You can modify the src/ to speficy your own model settings or datasets.

  • For training, use the command line python Training details will be printed on the screen. The learned parameters will be saved in in the same directory as per epoch, which will be named as epoch1, epoch2, ....
  • For test, the same command line python is used, but with a specified parameter file (e.g., epoch1), via the function argument load_params in (Note load_params should be None when training). In addition, tell your test file by setting dev_file (Yes, when test, consider it as "test_file"). The segmented result will be saved in src/result.

The code is originally designed for reasearch purpose, but adaptable to industrial use.


This code implements an efficient and effective neural word segmenter proposed in the following paper.

Deng Cai, Hai Zhao, etc., Fast and Accurate Neural Word Segmentation for Chinese. ACL 2017.

If you find it useful, please cite the paper.

  author    = {Cai, Deng  and  Zhao, Hai  and  Zhang, Zhisong  and  Xin, Yuan  and  Wu, Yongjian  and  Huang, Feiyue},
  title     = {Fast and Accurate Neural Word Segmentation for Chinese},
  booktitle = {Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)},
  month     = {July},
  year      = {2017},
  address   = {Vancouver, Canada},
  publisher = {Association for Computational Linguistics},
  pages     = {608--615},
  url       = {}


Drop me (Deng Cai) an email at thisisjcykcd (AT) if you have any question.


Source code for an ACL2017 paper on Chinese word segmentation

Greedycws Info

⭐ Stars 89
🔗 Source Code
🕒 Last Update a year ago
🕒 Created 5 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author jcyk