com.googlecode.jweb1t
Class JWeb1TSearcher

java.lang.Object
  extended by 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.


Constructor Summary
JWeb1TSearcher(File indexPath, int minN, int maxN)
          Try to deduce the index files from the given path.
JWeb1TSearcher(String... indexFiles)
           
 
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

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
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.