NICTCLAS: the. NET version of the lexical analysis system ICTCLAS (source code for download)

Source: Internet
Author: User

Again, please download a friend to use VS2005 to open and
Install. NET Framework 2.0. The source code is C ++/CLI, not C #,
Please do not send emails to ask me questions. Thank you for your cooperation.

Download source code at the end of the article


NICTCLAS is a free version of ICTCLAS, a famous Chinese Emy of Sciences Institute of computing technology.. NET package version, which is encapsulated into NICTCLAS using C ++/CLI based on the original free EXE source code. dll, rewrite the original CResult class to NICTCLAS managed class, and make a few changes to the source code to adapt to the VC8 compilation. Of course, there are N warnings, such as strcpy, because there are too many warnings to be ignored. If any error occurs, please correct it.

NICTCLAS is simplified to a certain extent. The interface is very simple and the common word splitting application is sufficient. Here we provide a C # execution program call example. Download and decompress the dictionary file in the Data directory corresponding to NICTCLAS. dll. If you need to call it in ASP. NET, modify the dictionary file path in the code.

Call code example

Public partial class Form1: Form
{
NICTCLAS nictclas;
Public Form1 ()
{
InitializeComponent ();
Try
{
Nictclas = new NICTCLAS ();
}
Catch (Exception ex)
{
MessageBox. Show (ex. Message );
}
}

Private void button#click (object sender, EventArgs e)
{
If (radioButton1.Checked)
Nictclas. OperateType = eOperateType. OnlySegment;
Else if (radioButton2.Checked)
Nictclas. OperateType = eOperateType. FirstTag;
Else if (radioButton3.Checked)
Nictclas. OperateType = eOperateType. SecondTag;

If (radioButton4.Checked)
Nictclas. OutputFormat = eOutputFormat. PKU;
Else if (radioButton5.Checked)
Nictclas. OutputFormat = eOutputFormat. _ 973;
Else if (radioButton6.Checked)
Nictclas. OutputFormat = eOutputFormat. XML;

DateTime start = DateTime. Now;
String result = "";
// **************** Word segmentation processing call
Nictclas. ParagraphProcessing (textBox1.Text, ref result );
DateTime finish = DateTime. Now;
TimeSpan t = (TimeSpan) (finish-start );
TextBox3.Text = t. TotalMilliseconds. ToString () + "ms ";
TextBox2.Text = result;
}
}

C # Call the program

Download execution File
(Sorry, before downloading it, add some credits for the next book.
Beneficiary's link http://www.netyi.net/in.asp? Id = edison1024, displayed after clicking)

Http://files.cnblogs.com/edison1024/NICTCLAS_Release.rar

 

Program Files (including C ++/cli c # source code and engineering files)
Http://files.cnblogs.com/edison1024/ictclas.rar

Dictionary files
Http://files.cnblogs.com/edison1024/Data.rar

ICTCLAS official free version
Http://www.ict.ac.cn/freeware/003_ictclas.asp

 

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.