General Chinese Word Segmenter provided by Nanjing University NLP Group
This package contains the Chinese word segmenter released by the natural language processing group of Nanjing University.
- Python 3.6
- dyNET >= 2.0
1.3.1 Quick Start
Below is a quick snippet of code that demonstrates how to use the API this package provides.
from njuseg.model import Segmenter # load a pretrained segmentation model. segmenter.load('path/to/model') # segment a Chinese sentence, note that the sentence should be encoded by utf-8. segmenter.seg(“上海浦东开发与法制建设同步。”)