public class CoreDictionary extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CoreDictionary.Attribute
核心词典中的词属性
|
| Modifier and Type | Field and Description |
|---|---|
static int |
M_WORD_ID |
static int |
NR_WORD_ID |
static int |
NS_WORD_ID |
static int |
NT_WORD_ID |
static int |
NX_WORD_ID |
static String |
path |
static int |
T_WORD_ID |
static int |
totalFrequency |
static DoubleArrayTrie<CoreDictionary.Attribute> |
trie |
static int |
X_WORD_ID |
| Constructor and Description |
|---|
CoreDictionary() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(String key)
是否包含词语
|
static CoreDictionary.Attribute |
get(int wordID)
获取条目
|
static CoreDictionary.Attribute |
get(String key)
获取条目
|
static int |
getTermFrequency(String term)
获取词频
|
static int |
getWordID(String a)
获取词语的ID
|
static boolean |
reload()
热更新核心词典
集群环境(或其他IOAdapter)需要自行删除缓存文件 |
public static DoubleArrayTrie<CoreDictionary.Attribute> trie
public static final String path
public static final int totalFrequency
public static final int NR_WORD_ID
public static final int NS_WORD_ID
public static final int NT_WORD_ID
public static final int T_WORD_ID
public static final int X_WORD_ID
public static final int M_WORD_ID
public static final int NX_WORD_ID
public static CoreDictionary.Attribute get(String key)
key - public static CoreDictionary.Attribute get(int wordID)
wordID - public static int getTermFrequency(String term)
term - public static boolean contains(String key)
key - public static int getWordID(String a)
a - 词语public static boolean reload()
Copyright © 2014–2021 码农场. All rights reserved.