edu.georgetown.gucs.matcher
Class HashFingerprintMatcher
java.lang.Object
edu.georgetown.gucs.matcher.FingerprintMatcher
edu.georgetown.gucs.matcher.HashFingerprintMatcher
public class HashFingerprintMatcher
- extends FingerprintMatcher
Determines if two fingerprints match based on their HashFingerprinter hash values
- Author:
- Clay Shields
Constructor Summary |
HashFingerprintMatcher()
Constructor that sets the minimum score to use for matching two fingerprints to zero |
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 hash values are the same; returns false if either hash
value represents an empty string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HashFingerprintMatcher
public HashFingerprintMatcher()
- Constructor that sets the minimum score to use for matching two fingerprints to zero
match
public boolean match(byte[] fp1,
byte[] fp2)
- Determines that the two fingerprints are matching if their hash values are the same; returns false if either hash
value represents an empty string
- Overrides:
match
in class FingerprintMatcher
- Parameters:
fp1
- the byte array containing the first fingerprintfp2
- 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 fingerprintfp2
- the byte array containing the second fingerprint
- Returns:
- the similarity score between these two fingerprints; returns 0 if the fingerprints are not an exact match,
returns 99 they are
main
public static void main(java.lang.String[] args)