Ictclas4j source code example (-)

Source: Internet
Author: User

Question:

After several months of intermittent learning, I finally figured out a part of ICTCLAS source code, and tried to use JAVA to implement one based on the original author's intention. At present, the first step of Word Segmentation can be achieved, however, the processing and part-of-speech tagging of personal names, place names, and unregistered words have not yet been completely clarified. I wanted to share it with you early, but I was afraid that it would be too ugly to meet people. I have been very busy with my work in recent weeks, and I have no time to take care of it for further implementation. For a long time, I am still determined to share my understanding and implementation with you. Thank you for your correction!

Package com. gftech. ictclas4j. bean;

Import org. apache. commons. lang. builder. ReflectionToStringBuilder;

/**
* </Pre>
*
* Atom
*
* Atoms are separated by the smallest unit of word segmentation. For example, each Chinese character to be segmented is an atom,
* Although the Start mark and end mark are a single character, they are also considered as atoms. For example, start # can no longer be split.
*
* For example, if the source string is "he said it is true", after being separated by atoms, it is: start # start with what he said
*
* </Pre>
*
* @ Author sinboy
*
*/
Public class Atom {
Private String word;

Private int pos;

Private int len;

Public int getLen (){
Return len;
}

Public void setLen (int len ){
This. len = len;
}

Public int getPos (){
Return pos;
}

Public void setPos (int pos ){
This. pos = pos;
}

Public String getWord (){
Return word;
}

Public void setWord (String word ){
This. word = word;
}
Public String toString (){

Return ReflectionToStringBuilder. toString (this );

}

}

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.