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 );
}
}