How to use the Java interface of CAs and its problems

Source: Internet
Author: User
Tags cas

1. Download the additional Chinese Academy of Sciences Participle Toolkit (to download the free download to my blog)

2. After extracting, you will see the following folders

3. Import the Java project into Eclipse, click Import, then select Existing project into workspace


4. Import the Java project file of Jnatest_nlpir under sample file and import it as determined


5. Modify the path problem under the Nlpirtest class:

(1) The path of my nlrir is "e:\ data mining \ Data Mining course work (junior) \ chinese word breaker 20140928\lib\win64\nlrir" (Note that if your system is 32-bit, the path is set to "Chinese participle 20140928\lib\win32 \nlrir ")

Public Interface Clibrary extends Library {

Defining and initializing static variables for an interface

Clibrary Instance = (clibrary) native.loadlibrary (

"e:\\ data mining \ \ Data Mining course work (junior) \ \ chinese Word segmentation 20140928\\lib\\win64\\nlpir", Clibrary. class);

(2) Modify the data path (I/\ictclasconf)

Areas prone to problems:

1. You must create a new folder named "ictclasconf" and copy the data file under this folder;

2. The path referenced is the previous folder path to the folder data. (Here, my Data folder is under "e:\ Data mining \ictclasconf", so referencing this path)

3. If your Java Coding System is GBK, you must follow the changes in my picture, or it will be wrong: (because this Java encoding itself is the output of utf-8, so the code must be modified)

3.1 Add A variable in the public interface clibrary extends library{} method as

3.2 Change the value of the Init_flag to the look shown.

6. The result can be obtained by running the debugging at last. (If you don't know what to look for me)

How to use the Java interface of CAs and its problems

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.