com.googlecode.jweb1t
Class JWeb1TSearcherInMemory

java.lang.Object
  extended by com.googlecode.jweb1t.JWeb1TSearcherInMemory
All Implemented Interfaces:
Searcher

public class JWeb1TSearcherInMemory
extends Object
implements Searcher

Memory-based implementation of the Searcher interface for accessing the data in Web1T-format. Requires a huge amount of memory for all but the tiniest ngram models.


Constructor Summary
JWeb1TSearcherInMemory(String ngramLocation, int maxNgramSize)
           
 
Method Summary
 long getFrequency(String aPhrase)
           
 long getNrOfDistinctNgrams(int aNGramSize)
           
 long getNrOfNgrams(int aNGramSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JWeb1TSearcherInMemory

public JWeb1TSearcherInMemory(String ngramLocation,
                              int maxNgramSize)
                       throws IOException
Throws:
IOException
Method Detail

getFrequency

public long getFrequency(String aPhrase)
                  throws IOException
Specified by:
getFrequency in interface Searcher
Throws:
IOException

getNrOfNgrams

public long getNrOfNgrams(int aNGramSize)
Specified by:
getNrOfNgrams in interface Searcher

getNrOfDistinctNgrams

public long getNrOfDistinctNgrams(int aNGramSize)
Specified by:
getNrOfDistinctNgrams in interface Searcher


Copyright © 2012. All Rights Reserved.