From 6a25fcab9522258d6fbfee14ad4787ea1c67d5c4 Mon Sep 17 00:00:00 2001 From: Rocky Madden Date: Mon, 21 Jan 2013 17:22:15 -0700 Subject: Better CLI examples. --- readme.md | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index ad182bd..9fbc502 100755 --- a/readme.md +++ b/readme.md @@ -54,24 +54,45 @@ if (StringMetric.compareWithJaroWinkler("string1", "string2")(StringFilter.ascii ## Using the CLI The help option prints command syntax and usage: ```shell -$ jaroWinklerMetric --help $ metaphoneMetric --help -$ metaphoneAlgorithm --help -``` -Compare "abc" to "xyz" using the Jaro-Winkler metric: -```shell -$ jaroWinklerMetric abc xyz +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. + +$ 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 "abc "to "xyz" using the Metaphone metric: +Compare "dog" to "dawg": ```shell -$ metaphoneMetric abc xyz +$ metaphoneMetric dog dawg + +true + +$ jaroWinklerMetric dog dawg + +0.75 ``` -Get the phonetic representation of "abc" using the Metaphone phonetic algorithm: +Get the phonetic representation of "dog" using the Metaphone phonetic algorithm: ```shell -$ metaphoneAlgorithm abc +$ metaphoneAlgorithm dog + +tk ``` ## Testing -- cgit v1.2.3