com.huaban.analysis.jieba
Class WordDictionary

java.lang.Object
  extended by com.huaban.analysis.jieba.WordDictionary

public class WordDictionary
extends Object


Field Summary
 Map<String,Word> freqs
           
 TrieNode trie
           
 
Method Summary
 boolean containsWord(String word)
           
 Double getFreq(String key)
           
static WordDictionary getInstance()
           
 TrieNode getTrie()
           
 Word getWord(String token)
           
 void init(File configFile)
          for ES to initialize the user dictionary.
 void loadDict()
           
 void loadUserDict(File userDict)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trie

public final TrieNode trie

freqs

public final Map<String,Word> freqs
Method Detail

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.