edu.iastate.jtm.dic
Class TrieDictionary
java.lang.Object
edu.iastate.jtm.dic.AbstractDictionary
edu.iastate.jtm.dic.TrieDictionary
public class TrieDictionary
- extends AbstractDictionary
A dictionary backed with a trie.
- Author:
- Jing Ding
| Fields inherited from class edu.iastate.jtm.dic.AbstractDictionary |
entryCount, entryTokenizer, keyBuffer, MATCH, matchedValue, MAX_ENTRY_LENGTH, MAX_TOKEN_LENGTH, MISMATCH, PARTIAL_ENTRY, partialAllowed, PARTIALMATCH, skipSpace, tokenBuffer, tokenProcessor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TrieDictionary
public TrieDictionary(Trie trie)
- Creates a new instance of TrieDictionary
TrieDictionary
public TrieDictionary(Trie trie,
boolean partial)
TrieDictionary
public TrieDictionary(Trie trie,
SlidingWindow tokenizer,
boolean partial,
boolean skipSpace)
continueMatch
public int continueMatch(java.lang.CharSequence word)
- Specified by:
continueMatch in class AbstractDictionary
match
public int match(java.lang.CharSequence word)
- Specified by:
match in class AbstractDictionary
putEntry
public void putEntry(java.lang.String key,
java.lang.Object val)
- Specified by:
putEntry in class AbstractDictionary
removeEntry
public java.lang.Object removeEntry(java.lang.String key)
- Specified by:
removeEntry in class AbstractDictionary
clear
public void clear()
- Specified by:
clear in class AbstractDictionary
isCaseSensitive
public boolean isCaseSensitive()
- Specified by:
isCaseSensitive in class AbstractDictionary
keys
public java.util.Enumeration keys()
- Specified by:
keys in class AbstractDictionary
getMatchedKey
public java.lang.String getMatchedKey()
- Specified by:
getMatchedKey in class AbstractDictionary
getPreMatchedNode
public TrieNode getPreMatchedNode()
setPreMatchedNode
public void setPreMatchedNode(TrieNode pmn)