|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jabb.util.text.word.Word
public class Word
词典里的中文词条。
Chinese word defined in dictionary.
| Field Summary | |
|---|---|
static int |
TYPE_IGNORE
需先剔除然后再进行分词处理的字符 Characters that should be removed before word identifying |
static int |
TYPE_KEYWORD
需要提取出来的关键词 Keywords that need to be identified |
static int |
TYPE_NORMAL
正常词汇 Normal word |
static int |
TYPE_SEPARATOR
词与词之间的分隔字符 Characters that separate adjacent words |
| Constructor Summary | |
|---|---|
Word()
|
|
Word(Word original)
创建一个实例,其内容是另一个实例的拷贝。 注意,keywordAttachment不会被拷贝,它会被引用。 |
|
| Method Summary | |
|---|---|
void |
clearType(int type)
标志这个词条不属于某种类型。 |
void |
clearTypes()
标示这个词条不属于任何一种类型。 |
Object |
getKeywordAttachment()
|
int |
getTypes()
|
String |
getWord()
|
void |
setKeywordAttachment(Object keywordAttachment)
|
void |
setType(int type)
标志这个词条属于某种类型。注意同一个词条可能同时属于多种类型。 |
void |
setTypes(int types)
|
void |
setWord(String word)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_NORMAL
public static final int TYPE_IGNORE
public static final int TYPE_SEPARATOR
public static final int TYPE_KEYWORD
| Constructor Detail |
|---|
public Word()
public Word(Word original)
Create an instance which is a copy of another instance. Note that keywordAttachment will not be copied, it will be referenced.
original - | Method Detail |
|---|
public String getWord()
public void setWord(String word)
word - 代表这个词的字符串
public void setType(int type)
Set the flag to indicate that this word belongs to a specified type. Note that one word can belong to many types in one time.
type - 类型public void clearType(int type)
Clear the flag to indicate this word does not belong to a specified type.
type - 类型public void clearTypes()
Clear all flags to indicate that this word does not belong to any type.
public int getTypes()
public void setTypes(int types)
types - the types to setpublic Object getKeywordAttachment()
public void setKeywordAttachment(Object keywordAttachment)
keywordAttachment - 进行关键词匹配时这个词所对应的附件对象
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||