Created: 2012-03-25 12:09
Updated: 2014-09-20 06:30



mmseg4a is an Android porting of the LibMMSeg library, which base on the MMSEG algorithm.


You should load the dictionary first with the SegmenterManager object, and create a Segmenter object with createSegmenter method, call it's segment method to take the tokens.

SegmenterManager mgr = new DictionaryLoader(DemoActivity.this).load();
String tokens = mgr.createSegmenter(true).segment("这是一段需要分词的中文").getTokens();

Please check the DemoActivity class for more details.


You could run the performance tests in the demo folder.

loaded dictionary in 567ms
loaded a sample file with 31458 lines/2761.38 KBs in 5135ms
found 1110124 tokens in 29765ms (92.77KB/s, 37296.29 tokens/s)

(HTC DHD with 1G CPU and 768M memory)

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more