edu.georgetown.gucs.matcher
Class SimpleScoreFingerprintMatcher

java.lang.Object
  extended by edu.georgetown.gucs.matcher.FingerprintMatcher
      extended by edu.georgetown.gucs.matcher.SimpleScoreFingerprintMatcher

public class SimpleScoreFingerprintMatcher
extends FingerprintMatcher

Provides a score to base a similarity match using a BitVectorFingerprinter.

Author:
Clay Shields

Field Summary
 
Fields inherited from class edu.georgetown.gucs.matcher.FingerprintMatcher
matcherName, minimum_score
 
Constructor Summary
SimpleScoreFingerprintMatcher()
          Constructor that sets the minimum score to use for matching two fingerprints to zero
SimpleScoreFingerprintMatcher(int score)
          Constructor that sets the minimum score to use for matching two fingerprints
SimpleScoreFingerprintMatcher(java.lang.String score)
          Constructor that sets the minimum score to use for matching two fingerprints.
 
Method Summary
 int getScore(byte[] fp1, byte[] fp2)
          Determines a similarity score for these two fingerprints
static void main(java.lang.String[] args)
           
 boolean match(byte[] fp1, byte[] fp2)
          Determines that the two fingerprints are matching if their similarity score is above the minimum score for this fingerprinter
 
Methods inherited from class edu.georgetown.gucs.matcher.FingerprintMatcher
getMatcherName, getMinimumScore, getScoreXML, match, setMinimumScore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleScoreFingerprintMatcher

public SimpleScoreFingerprintMatcher()
Constructor that sets the minimum score to use for matching two fingerprints to zero


SimpleScoreFingerprintMatcher

public SimpleScoreFingerprintMatcher(int score)
Constructor that sets the minimum score to use for matching two fingerprints

Parameters:
score - the minimum score needed to be considered a match

SimpleScoreFingerprintMatcher

public SimpleScoreFingerprintMatcher(java.lang.String score)
Constructor that sets the minimum score to use for matching two fingerprints. The string parameter is needed for use with ObjectBuilder.

Parameters:
score - the string value of the minimum score needed to be considered a match
Method Detail

match

public boolean match(byte[] fp1,
                     byte[] fp2)
Determines that the two fingerprints are matching if their similarity score is above the minimum score for this fingerprinter

Overrides:
match in class FingerprintMatcher
Parameters:
fp1 - the byte array containing the first fingerprint
fp2 - the byte array containing the second fingerprint
Returns:
the boolean value indicating if the two fingerprints have matching documents; by default, returns false.

getScore

public int getScore(byte[] fp1,
                    byte[] fp2)
Determines a similarity score for these two fingerprints

Overrides:
getScore in class FingerprintMatcher
Parameters:
fp1 - the byte array containing the first fingerprint
fp2 - the byte array containing the second fingerprint
Returns:
the similarity score between these two fingerprints, ranges from 0-99

main

public static void main(java.lang.String[] args)