Java Chinese Academy of Sciences Participle configuration (Ictclas)

Source: Internet
Author: User

Before fragmented used a few times, the configuration is not the tube. Later when the use of the forgotten how to configure, and find a lot of information (too troublesome). Now summarize the notes as follows:

First, download the Chinese Academy of Sciences participle project.

GitHub site: Https://github.com/NLPIR-team/NLPIR/tree/master/NLPIR%20SDK/NLPIR-ICTCLAS

Two ways to use a project that is imported directly into eclipse

Configure two paths in this Java file

The first one:

Defining and initializing static variables for an interface
Clibrary Instance = (clibrary) native.loadlibrary ("D:\\nlpir\\bin\\ictclas2013\\x64\\nlpir", Clibrary.class);

D:\\nlpir\\bin\\ictclas2013\\x64\\nlpir this path to one of the following paths (PS what system to choose what folder if you are Win32 bit then the path is changed to h:\\work_eclipse\\ 20160707102537_ictclas2016 word breaker download package \ \ Chinese word 20140928\\lib\\win32\\nlpir The last Nlpir is the file name does not need to add a suffix, of course, you can also take this file alone to build a directory to store. Just change the path to the directory's path.)

The second one:

String Argu = "D:\\nlpir";
String system_charset = "GBK";//GBK----0
String system_charset = "UTF-8";

Argu is the Data folder path, find the Data folder path replacement He can (also can be the data folder alone to build a directory to store, as long as the path to the directory of the path to it)

The path is changed to string Argu = "h:\\work_eclipse\\20160707102537_ictclas2016 word system download package \ \ Chinese word breaker 20140928";

Running nlpirtest after configuration is complete may appear not valid license or your license expired this error. This time you want to click on this url:https://github.com/nlpir-team/nlpir/tree/master/license

Find the authorization you want as needed. :

Taking participle as an example select one month authorization click "Nlpir-ictclas word breaker authorization. RAR"

Click View Raw to download (Other ways to download may appear folder with bad situation)

After decompression, copy the Nlpir.user inside to the data file. Then run the Nlpirtest class to get the results.

Another is to use the Chinese Academy of Sciences participle in the project. The configuration is not described above, and the above method is different from the one you want to deploy the Chinese Academy of Sciences participle jar package in the project. :

Deploy the jar package to your project, and then copy the Nlpirtest to your project to run.

Import Utils. Systemparas; This error can be deleted directly, of course, you can also copy this class to the project configuration (but it does not seem to be used). (PS if you want to do other research just add other code in nlpirtest)

Java Chinese Academy of Sciences Participle configuration (Ictclas)

Related Article

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.