Package org.lionsoul.jcseg
Interface IWord
-
-
Field Summary
Fields Modifier and Type Field Description static String[]EN_POSPEECHstatic String[]MIX_POSPEECHstatic String[]NAME_POSPEECHstatic String[]NUMERIC_POSPEECHstatic String[]PPT_POSPEECHstatic String[]PUNCTUATIONstatic String[]QUANTIFIERstatic intT_BASIC_LATINLatin series including the Arabic numbers.static intT_CJK_PINYINChinese Pinyinstatic intT_CJK_WORDChinese,Japanese,Korean wordsstatic intT_CN_NAMEChinese last name.static intT_CN_NICKNAMEChinese nickname like: 老陈static intT_CN_NUMERICChinese numericstatic intT_LETTER_NUMBERletter number like 'ⅠⅡ'static intT_MIXED_WORDChinese and English mix word like B超,SIM卡.static intT_OTHER_NUMBERother number like '①⑩⑽㈩'static intT_PUNCTUATIONstatic intT_UNRECOGNIZE_WORDuseless chars like the CJK punctuationstatic String[]TIME_POSPEECHstatic String[]UNRECOGNIZE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEntity(String e)append a new entityvoidaddPartSpeech(String ps)add a new part to speech to the word.IWordclone()make clone availablebooleanequals(Object o)you have to rewrite the #equals method cause the Jcseg require itString[]getEntity()get the entity name array of the wordStringgetEntity(int idx)get the specified entity by indexintgetFrequency()return the frequency of the word, use only when the word's length is one.intgetLength()return the length of the wordStringgetParameter()return the additional parametersString[]getPartSpeech()return the part of speech of the word.StringgetPinyin()return the pinyin of the wordintgetPosition()return the start position of the word.SynonymsEntrygetSyn()return the Synonyms' entry of the word.intgetType()return the type of the wordStringgetValue()return the value of the wordvoidsetEntity(String[] entity)set the entity name array of the wordvoidsetEntityForNull(String[] entity)voidsetFrequency(int freq)set the frequency of the wordvoidsetLength(int length)self define the lengthvoidsetParameter(String param)set the string parametersvoidsetPartSpeech(String[] ps)voidsetPartSpeechForNull(String[] ps)voidsetPinyin(String py)set the pinyin of the wordvoidsetPosition(int pos)set the position of the wordvoidsetSyn(SynonymsEntry syn)voidsetType(int type)set the type of the word
-
-
-
Field Detail
-
NAME_POSPEECH
static final String[] NAME_POSPEECH
-
NUMERIC_POSPEECH
static final String[] NUMERIC_POSPEECH
-
TIME_POSPEECH
static final String[] TIME_POSPEECH
-
EN_POSPEECH
static final String[] EN_POSPEECH
-
MIX_POSPEECH
static final String[] MIX_POSPEECH
-
PPT_POSPEECH
static final String[] PPT_POSPEECH
-
PUNCTUATION
static final String[] PUNCTUATION
-
QUANTIFIER
static final String[] QUANTIFIER
-
UNRECOGNIZE
static final String[] UNRECOGNIZE
-
T_CJK_WORD
static final int T_CJK_WORD
Chinese,Japanese,Korean words- See Also:
- Constant Field Values
-
T_MIXED_WORD
static final int T_MIXED_WORD
Chinese and English mix word like B超,SIM卡.- See Also:
- Constant Field Values
-
T_CN_NAME
static final int T_CN_NAME
Chinese last name.- See Also:
- Constant Field Values
-
T_CN_NICKNAME
static final int T_CN_NICKNAME
Chinese nickname like: 老陈- See Also:
- Constant Field Values
-
T_BASIC_LATIN
static final int T_BASIC_LATIN
Latin series including the Arabic numbers.- See Also:
- Constant Field Values
-
T_LETTER_NUMBER
static final int T_LETTER_NUMBER
letter number like 'ⅠⅡ'- See Also:
- Constant Field Values
-
T_OTHER_NUMBER
static final int T_OTHER_NUMBER
other number like '①⑩⑽㈩'- See Also:
- Constant Field Values
-
T_CJK_PINYIN
static final int T_CJK_PINYIN
Chinese Pinyin- See Also:
- Constant Field Values
-
T_CN_NUMERIC
static final int T_CN_NUMERIC
Chinese numeric- See Also:
- Constant Field Values
-
T_PUNCTUATION
static final int T_PUNCTUATION
- See Also:
- Constant Field Values
-
T_UNRECOGNIZE_WORD
static final int T_UNRECOGNIZE_WORD
useless chars like the CJK punctuation- See Also:
- Constant Field Values
-
-
Method Detail
-
getValue
String getValue()
return the value of the word
-
getLength
int getLength()
return the length of the word
-
setLength
void setLength(int length)
self define the length
-
getFrequency
int getFrequency()
return the frequency of the word, use only when the word's length is one.
-
setFrequency
void setFrequency(int freq)
set the frequency of the word
-
getType
int getType()
return the type of the word
-
setType
void setType(int type)
set the type of the word
-
setPosition
void setPosition(int pos)
set the position of the word
-
getPosition
int getPosition()
return the start position of the word.
-
getEntity
String[] getEntity()
get the entity name array of the word
-
getEntity
String getEntity(int idx)
get the specified entity by index
-
setEntity
void setEntity(String[] entity)
set the entity name array of the word
-
setEntityForNull
void setEntityForNull(String[] entity)
-
addEntity
void addEntity(String e)
append a new entity
-
getPinyin
String getPinyin()
return the pinyin of the word
-
getSyn
SynonymsEntry getSyn()
return the Synonyms' entry of the word.
-
setSyn
void setSyn(SynonymsEntry syn)
-
getPartSpeech
String[] getPartSpeech()
return the part of speech of the word.
-
setPartSpeech
void setPartSpeech(String[] ps)
-
setPartSpeechForNull
void setPartSpeechForNull(String[] ps)
-
setPinyin
void setPinyin(String py)
set the pinyin of the word
-
addPartSpeech
void addPartSpeech(String ps)
add a new part to speech to the word.
-
getParameter
String getParameter()
return the additional parameters
-
setParameter
void setParameter(String param)
set the string parameters
-
equals
boolean equals(Object o)
you have to rewrite the #equals method cause the Jcseg require it
-
clone
IWord clone()
make clone available
-
-