summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorRocky Madden <git@rockymadden.com>2013-01-23 14:49:28 -0700
committerRocky Madden <git@rockymadden.com>2013-01-23 14:49:28 -0700
commit7d431a9d10b7f9bf8b0b0e38fa7c27b6f6196bc9 (patch)
tree43b69b9d7f41aabb350527216474d4d0adb119ba /readme.md
parent7cd7e2bd830c6b261d5f78a5a54c7d4012ac48aa (diff)
downloadstringmetric-7d431a9d10b7f9bf8b0b0e38fa7c27b6f6196bc9.tar.gz
stringmetric-7d431a9d10b7f9bf8b0b0e38fa7c27b6f6196bc9.tar.bz2
stringmetric-7d431a9d10b7f9bf8b0b0e38fa7c27b6f6196bc9.zip
Added command line interfaces section.
Diffstat (limited to 'readme.md')
-rwxr-xr-xreadme.md44
1 files changed, 44 insertions, 0 deletions
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