From 7d431a9d10b7f9bf8b0b0e38fa7c27b6f6196bc9 Mon Sep 17 00:00:00 2001 From: Rocky Madden Date: Wed, 23 Jan 2013 14:49:28 -0700 Subject: Added command line interfaces section. --- readme.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 638d225..6c71ed9 100755 --- a/readme.md +++ b/readme.md @@ -293,6 +293,50 @@ StringMetric.compareWithJaroWinkler("string1", "string2")(StringFilter.asciiLett StringAlgorithm.computeWithMetaphone("string1", "string2") ``` +## Command line interfaces +Every metric and algorithm has a command line interface. + +The help option prints command syntax and usage: +```shell +$ metaphoneMetric --help +Compares two strings to determine if they are phonetically similarly, per the Metaphone algorithm. + +Syntax: + metaphoneMetric [Options] string1 string2... + +Options: + -h, --help + Outputs description, syntax, and options. +``` + +```shell +$ jaroWinklerMetric --help +Compares two strings to calculate the Jaro-Winkler distance. + +Syntax: + jaroWinklerMetric [Options] string1 string2... + +Options: + -h, --help + Outputs description, syntax, and options. +``` + +Compare "dog" to "dawg": +```shell +$ metaphoneMetric dog dawg +true +``` + +```shell +$ jaroWinklerMetric dog dawg +0.75 +``` + +Get the phonetic representation of "dog" using the Metaphone phonetic algorithm: +```shell +$ metaphoneAlgorithm dog +tk + ## Todo * SmithWaterman * MongeElkan -- cgit v1.2.3