summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorRocky Madden <git@rockymadden.com>2013-01-23 14:34:35 -0700
committerRocky Madden <git@rockymadden.com>2013-01-23 14:34:35 -0700
commit3f7acdffbed47acf1563716ad9af30bda9d042b4 (patch)
tree8178a6fbe7450800b1af50ba0f8a099e11633d1e /readme.md
parente71c079bedab710292302011b12a5bdb8dee9292 (diff)
downloadstringmetric-3f7acdffbed47acf1563716ad9af30bda9d042b4.tar.gz
stringmetric-3f7acdffbed47acf1563716ad9af30bda9d042b4.tar.bz2
stringmetric-3f7acdffbed47acf1563716ad9af30bda9d042b4.zip
Added Soundex examples.
Diffstat (limited to 'readme.md')
-rwxr-xr-xreadme.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index 5f97dde..9a600b5 100755
--- a/readme.md
+++ b/readme.md
@@ -243,6 +243,30 @@ h093
l7081096
```
+__Soundex Metric:__
+```scala
+println(SoundexMetric.compare("robert", "rupert"))
+println(SoundexMetric.compare("robert", "rubin"))
+```
+
+Output:
+```
+true
+false
+```
+
+__Soundex Algorithm:__
+```scala
+println(SoundexAlgorithm.compute("rupert"))
+println(SoundexAlgorithm.compute("lukasiewicz"))
+```
+
+Output:
+```
+r163
+l222
+```
+
## Todo
* SmithWaterman
* MongeElkan