net.java.sen.trie
Class TrieSearcher
java.lang.Object
net.java.sen.trie.TrieSearcher
public class TrieSearcher
- extends Object
Searches a Trie data file
|
Method Summary |
static int |
commonPrefixSearch(IntBuffer trieData,
CharIterator iterator,
int[] results)
Searches for Trie keys forming a complete substring of the given
sentence, starting at the given position within the sentence |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TrieSearcher
public TrieSearcher()
commonPrefixSearch
public static int commonPrefixSearch(IntBuffer trieData,
CharIterator iterator,
int[] results)
- Searches for Trie keys forming a complete substring of the given
sentence, starting at the given position within the sentence
- Parameters:
trieData - The Trie data to searchiterator - The character iterator to read search characters fromresults - An array used to return the values of the found keys
- Returns:
- The number of results found
- Throws:
ArrayIndexOutOfBoundsException - if results[] is too small
Copyright © 2012. All Rights Reserved.