public class Word extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_DIGIT |
static String |
TYPE_DIGIT_OR_LETTER
数字开头的"字母或数字"
|
static String |
TYPE_LETTER |
static String |
TYPE_LETTER_NUMBER |
static String |
TYPE_LETTER_OR_DIGIT
字母开头的"字母或数字"
|
static String |
TYPE_OTHER_NUMBER |
static String |
TYPE_WORD |
| Constructor and Description |
|---|
Word(char[] word,
int startOffset) |
Word(char[] sen,
int senStartOffset,
int offset,
int len)
sen[offset] 开始的 len 个字符才是此 word
|
Word(char[] word,
int startOffset,
String wordType) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDegree() |
int |
getEndOffset() |
int |
getLength() |
char[] |
getSen() |
int |
getStartOffset()
此 word 在整个文本中的偏移位置
|
String |
getString() |
String |
getType() |
int |
getWordOffset()
词在 char[] sen 的偏移位置
|
void |
setDegree(int degree) |
void |
setType(String type) |
String |
toString() |
public static final String TYPE_WORD
public static final String TYPE_LETTER
public static final String TYPE_LETTER_OR_DIGIT
public static final String TYPE_DIGIT
public static final String TYPE_DIGIT_OR_LETTER
public static final String TYPE_LETTER_NUMBER
public static final String TYPE_OTHER_NUMBER
public Word(char[] word,
int startOffset)
startOffset - word 在整个文本中的偏移位置public Word(char[] word,
int startOffset,
String wordType)
startOffset - word 在整个文本中的偏移位置public Word(char[] sen,
int senStartOffset,
int offset,
int len)
senStartOffset - sen 在整个文本中的偏移位置offset - 词在 sen 的偏移位置len - 词长public String getString()
public int getWordOffset()
getSen()public int getLength()
public char[] getSen()
public int getStartOffset()
public int getEndOffset()
public int getDegree()
public void setDegree(int degree)
public String getType()
public void setType(String type)
Copyright © 2015-2016 Ganshane Developer Team. All Rights Reserved.