public class CompareDirectory
extends java.lang.Object
Constructor and Description |
---|
CompareDirectory(java.lang.String match,
java.lang.String fingerprintFile,
java.lang.String directory)
Constructor that sets the matcher, fingerprint file and directory to use for this comparison
|
CompareDirectory(java.lang.String match,
java.lang.String fingerprintFile,
java.lang.String directory,
int minimumScore)
Constructor that sets the matcher, fingerprint file, directory and minimum score to use for this comparison
|
CompareDirectory(java.lang.String match,
java.lang.String fingerprintFile,
java.lang.String directory,
int minimumScore,
java.lang.String dictionary)
Constructor that sets the matcher, fingerprint file, directory, minimum score and dictionary to use for this
comparison
|
Modifier and Type | Method and Description |
---|---|
void |
computeFingerprints()
Compute a fingerprint for each file in this directory and compare it to this fingerprint using this matcher; if the
matcher returns boolean values, true values are given a score of 99 and false values are given a score of 0
|
static void |
main(java.lang.String[] args)
Outputs a list of files and their scores, comparing a given fingerprint to a directory of files.
|
void |
printScores()
Print all the files and their similarity scores; if a minimum score is provided, only output those files with
scores greater than or equal to the minimum
|
public CompareDirectory(java.lang.String match, java.lang.String fingerprintFile, java.lang.String directory)
match
- the string name of the matcher to use for this comparisonfingerprintFile
- the string filename of the fingerprint to compare with this directorydirectory
- the string directory path to compare with this fingerprintpublic CompareDirectory(java.lang.String match, java.lang.String fingerprintFile, java.lang.String directory, int minimumScore)
match
- the string name of the matcher to use for this comparisonfingerprintFile
- the string filename of the fingerprint to compare with this directorydirectory
- the string directory path to compare with this fingerprintminimumScore
- the int
minimum score needed to output a file for this comparisonpublic CompareDirectory(java.lang.String match, java.lang.String fingerprintFile, java.lang.String directory, int minimumScore, java.lang.String dictionary)
match
- the string name of the matcher to use for this comparisonfingerprintFile
- the string filename of the fingerprint to compare with this directorydirectory
- the string directory path to compare with this fingerprintminimumScore
- the int
minimum score needed to output a file for this comparisondictionary
- the string filename of the dictionary to use for this comparison; this dictionary will only be used if the
fingerprint file does not already contain a full dictionarypublic void computeFingerprints()
public void printScores()
public static void main(java.lang.String[] args)
args
- array of string command line argumentsargs[0]
the name of the matcher to use for this comparisonargs[1]
the filename of the fingerprint to compare with this directoryargs[2]
the directory path to compare with this fingerprintargs[3]
the optional integer minimum score needed to output a file for this comparisonargs[4]
the optional filename of the dictionary to use for this comparison; only used if the
fingerprint file does not contain a full dictionary