Chinese division of speech based on MMSEG algorithm

Source: Internet
Author: User

Text: Library of Chinese word division based on MMSEG algorithm

Recently in the implementation of Lucene.Net-based search scheme, involving Chinese word segmentation, found a lot, eventually chose Mmseg4j, but mmseg4j only Java version, found in the blog Park * Wang Squire * (http://www.cnblogs.com/land/ archive/2011/07/19/mmseg4j.html) is based on the Java version of the translation code, but it does not support the latest lucene.net 3.0.3, so based on its code upgrade to the latest version of Lucene.Net (≥3.0.3), It also modifies most of the Java-style code to. NET style and fixes several minor bugs.

To make it easier for everyone to use, I put the modified code on GitHub and included a simple sample code. In addition, to facilitate the use of the NuGet installation package, uploaded to NuGet, when used, the direct NuGet search Lucene.Net.Analysis.MMSeg can be.

git address

Https://github.com/JimLiu/Lucene.Net.Analysis.MMSeg

NuGet Address

https://nuget.org/packages/Lucene.Net.Analysis.MMSeg/

Pm> Install-package Lucene.Net.Analysis.MMSeg

Use

There are three different search modes to choose from:

Simpleanalyzer

Analyzer Analyzer = New Simpleanalyzer ();

Maxwordanalyzer

Analyzer Analyzer = New Maxwordanalyzer ();

Complexanalyzer

Analyzer Analyzer = New Complexanalyzer ();

Refer to the examples in the code and Lucene.Net's documentation for specific usage

Chinese division of speech based on MMSEG algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.