|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.utility.Lexicon
public class Lexicon
跟词语与词性有关的工具类,可以全局动态修改HanLP内部词库
| 构造方法摘要 | |
|---|---|
Lexicon()
|
|
| 方法摘要 | |
|---|---|
static CoreDictionary.Attribute |
getAttribute(String word)
从HanLP的词库中提取某个单词的属性(包括核心词典和用户词典) |
static CoreDictionary.Attribute |
getAttribute(Term term)
从HanLP的词库中提取某个单词的属性(包括核心词典和用户词典) |
static int |
getFrequency(String word)
获取某个单词的词频 |
static boolean |
setAttribute(String word,
CoreDictionary.Attribute attribute)
设置某个单词的属性 |
static boolean |
setAttribute(String word,
String natureWithFrequency)
设置某个单词的属性 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public Lexicon()
| 方法详细信息 |
|---|
public static CoreDictionary.Attribute getAttribute(String word)
word - 单词
public static CoreDictionary.Attribute getAttribute(Term term)
term - 单词
public static int getFrequency(String word)
word -
public static boolean setAttribute(String word,
CoreDictionary.Attribute attribute)
word - attribute -
public static boolean setAttribute(String word,
String natureWithFrequency)
word - natureWithFrequency -
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||