net.java.sen.trie
Class TrieSearcher

java.lang.Object
  extended by net.java.sen.trie.TrieSearcher

public class TrieSearcher
extends Object

Searches a Trie data file


Constructor Summary
TrieSearcher()
           
 
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
 

Constructor Detail

TrieSearcher

public TrieSearcher()
Method Detail

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 search
iterator - The character iterator to read search characters from
results - 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.