com.googlecode.jweb1t
Class JWeb1TSearcherInMemory
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JWeb1TSearcherInMemory
public JWeb1TSearcherInMemory(String ngramLocation,
int maxNgramSize)
throws IOException
- Throws:
IOException
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.