|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.dictionary.common.CommonDictionary<V>
public abstract class CommonDictionary<V>
通用的词典,对应固定格式的词典,但是标签可以泛型化
| 嵌套类摘要 | |
|---|---|
class |
CommonDictionary.Searcher
前缀搜索,长短都可匹配 |
| 构造方法摘要 | |
|---|---|
CommonDictionary()
|
|
| 方法摘要 | |
|---|---|
boolean |
contains(String key)
是否含有键 |
V |
get(String key)
查询一个单词 |
BaseSearcher |
getSearcher(String text)
|
boolean |
load(String path)
|
protected abstract V[] |
onLoadValue(String path)
实现此方法来加载值 |
protected abstract boolean |
onSaveValue(V[] valueArray,
String path)
|
int |
size()
词典大小 |
static boolean |
sort(String path)
排序这个词典 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public CommonDictionary()
| 方法详细信息 |
|---|
public boolean load(String path)
public V get(String key)
key -
public boolean contains(String key)
key -
public int size()
public static boolean sort(String path)
path -
protected abstract V[] onLoadValue(String path)
path -
protected abstract boolean onSaveValue(V[] valueArray,
String path)
public BaseSearcher getSearcher(String text)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||