com.huaban.analysis.jieba
Class WordDictionary
java.lang.Object
com.huaban.analysis.jieba.WordDictionary
public class WordDictionary
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
trie
public final TrieNode trie
freqs
public final Map<String,Word> freqs
getInstance
public static WordDictionary getInstance()
init
public void init(File configFile)
- for ES to initialize the user dictionary.
- Parameters:
configFile -
loadDict
public void loadDict()
loadUserDict
public void loadUserDict(File userDict)
getTrie
public TrieNode getTrie()
containsWord
public boolean containsWord(String word)
getWord
public Word getWord(String token)
getFreq
public Double getFreq(String key)
Copyright © 2013–2014. All rights reserved.