summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorRocky Madden <git@rockymadden.com>2013-01-21 17:22:15 -0700
committerRocky Madden <git@rockymadden.com>2013-01-21 17:22:15 -0700
commit6a25fcab9522258d6fbfee14ad4787ea1c67d5c4 (patch)
tree4cf0ca3191a5de6b664cfe62fa82c84ee480c090 /readme.md
parent7e3be5d8f27c2dfc128b06425a59c8a11fc52518 (diff)
downloadstringmetric-6a25fcab9522258d6fbfee14ad4787ea1c67d5c4.tar.gz
stringmetric-6a25fcab9522258d6fbfee14ad4787ea1c67d5c4.tar.bz2
stringmetric-6a25fcab9522258d6fbfee14ad4787ea1c67d5c4.zip
Better CLI examples.
Diffstat (limited to 'readme.md')
-rwxr-xr-xreadme.md41
1 files 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