public class Term extends Object
| Modifier and Type | Field and Description |
|---|---|
Nature |
nature
词性
|
int |
offset
在文本中的起始位置(需开启分词器的offset选项)
|
String |
word
词语
|
| Constructor and Description |
|---|
Term(String word,
Nature nature)
构造一个单词
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
判断Term是否相等
|
int |
getFrequency()
获取本词语在HanLP词库中的频次
|
int |
length()
长度
|
String |
toString() |
Copyright © 2014–2021 码农场. All rights reserved.