EN_POSPEECH, MIX_POSPEECH, NAME_POSPEECH, NUMERIC_POSPEECH, PPT_POSPEECH, PUNCTUATION, T_BASIC_LATIN, T_CJK_PINYIN, T_CJK_WORD, T_CN_NAME, T_CN_NICKNAME, T_CN_NUMERIC, T_LETTER_NUMBER, T_MIXED_WORD, T_OTHER_NUMBER, T_PUNCTUATION, T_UNRECOGNIZE_WORD, UNRECOGNIZE| Constructor and Description |
|---|
Word(String value,
int type) |
Word(String value,
int fre,
int type) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPartSpeech(String ps)
add a new part to speech to the word.
|
void |
addSyn(String s)
add a new syn word to the word.
|
IWord |
clone()
Interface to clone the current object
|
boolean |
equals(Object o)
I mean: you have to rewrite the equals method
cause the jcseg require it
|
int |
getFrequency()
return the frequency of the word,
use only when the word's length is one.
|
int |
getLength()
return the length of the word
|
String[] |
getPartSpeech()
return the part of speech of the word.
|
String |
getPinyin()
return the pinying of the word
|
int |
getPosition()
return the start position of the word.
|
String[] |
getSyn()
return the syn words of the word.
|
int |
getType()
return the type of the word
|
String |
getValue()
return the value of the word
|
int |
hashCode()
rewrite the hash code generate algorithm
take the value as the main factor
|
void |
setLength(int length)
self define the length
|
void |
setPartSpeech(String[] partspeech) |
void |
setPinyin(String py)
set the pinying of the word
|
void |
setPosition(int pos)
set the position of the word
|
void |
setSyn(String[] syn) |
String |
toString() |
public Word(String value, int type)
public Word(String value, int fre, int type)
public String getValue()
IWordgetValue in interface IWordIWord.getValue()public int getLength()
IWordgetLength in interface IWordIWord.getLength()public void setLength(int length)
IWordsetLength in interface IWordIWord.setLength(int)public int getFrequency()
IWordgetFrequency in interface IWordIWord.getFrequency()public int getType()
IWordgetType in interface IWordIWord.getType()public void setPosition(int pos)
IWordsetPosition in interface IWordIWord.setPosition(int)public int getPosition()
IWordgetPosition in interface IWordIWord.getPosition()public String getPinyin()
IWordpublic String[] getSyn()
IWordgetSyn in interface IWordIWord.getSyn()public String[] getPartSpeech()
IWordgetPartSpeech in interface IWordIWord.getPartSpeech()public void setPartSpeech(String[] partspeech)
setPartSpeech in interface IWordpublic void setPinyin(String py)
IWordpublic void addPartSpeech(String ps)
IWordaddPartSpeech in interface IWordIWord.addPartSpeech( String );public void addSyn(String s)
IWordaddSyn in interface IWordIWord.addSyn(String)public boolean equals(Object o)
IWordequals in interface IWordequals in class ObjectObject.equals(Object),
IWord.equals(Object)public IWord clone()
public String toString()
toString in class ObjectObject.toString()Copyright © 2016. All Rights Reserved.