com.googlecode.jweb1t
Class JWeb1TSearcher
java.lang.Object
com.googlecode.jweb1t.JWeb1TSearcher
- All Implemented Interfaces:
- Searcher
public class JWeb1TSearcher
- extends Object
- implements Searcher
Search-on-disk based implementation of the Searcher interface for accessing the data in Web1T-format.
Requires very little memory, but is rather slow.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JWeb1TSearcher
public JWeb1TSearcher(String... indexFiles)
throws IOException
- Throws:
IOException
JWeb1TSearcher
public JWeb1TSearcher(File indexPath,
int minN,
int maxN)
throws IOException
- Try to deduce the index files from the given path.
- Parameters:
indexPath - The path in which the ngram index files are located.minN - The minimum ngram length.maxN - The maximum ngram length.
- 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.