com.wcohen.ss.lookup
Class RescoringSoftTFIDFDictionary

java.lang.Object
  extended by com.wcohen.ss.lookup.RescoringSoftTFIDFDictionary
All Implemented Interfaces:
FastLookup

public class RescoringSoftTFIDFDictionary
extends java.lang.Object
implements FastLookup

Wrapper around a SoftTFIDFDictionary that allows you to 'rescore' the result using an arbitrary StringDistance.


Constructor Summary
RescoringSoftTFIDFDictionary(FastLookup inner, double innerMinScore, StringDistance rescorer)
           
 
Method Summary
 java.lang.String getResult(int i)
          Get the i'th string found by the last lookup
 double getScore(int i)
          Get the score of the i'th string found by the last lookup
 java.lang.Object getValue(int i)
          Get the value of the i'th string found by the last lookup
 int lookup(double minScore, java.lang.String toFind)
          Lookup items similar to 'toFind', and return the number of items found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RescoringSoftTFIDFDictionary

public RescoringSoftTFIDFDictionary(FastLookup inner,
                                    double innerMinScore,
                                    StringDistance rescorer)
Method Detail

lookup

public int lookup(double minScore,
                  java.lang.String toFind)
Description copied from interface: FastLookup
Lookup items similar to 'toFind', and return the number of items found. The found items must have a similarity score greater than minScore to 'toFind'.

Specified by:
lookup in interface FastLookup

getResult

public java.lang.String getResult(int i)
Description copied from interface: FastLookup
Get the i'th string found by the last lookup

Specified by:
getResult in interface FastLookup

getValue

public java.lang.Object getValue(int i)
Description copied from interface: FastLookup
Get the value of the i'th string found by the last lookup

Specified by:
getValue in interface FastLookup

getScore

public double getScore(int i)
Description copied from interface: FastLookup
Get the score of the i'th string found by the last lookup

Specified by:
getScore in interface FastLookup