summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorRocky Madden <git@rockymadden.com>2013-01-23 14:15:18 -0700
committerRocky Madden <git@rockymadden.com>2013-01-23 14:15:18 -0700
commit1641306557c9cf0b283dfe39fd2c51bf4c76baba (patch)
treecb613b80194696d9a9958f120d124a7a3b7083ea /readme.md
parentf7ea57ca37a26040b64a2ef17b76647ae1760a1a (diff)
downloadstringmetric-1641306557c9cf0b283dfe39fd2c51bf4c76baba.tar.gz
stringmetric-1641306557c9cf0b283dfe39fd2c51bf4c76baba.tar.bz2
stringmetric-1641306557c9cf0b283dfe39fd2c51bf4c76baba.zip
Added Metaphone examples.
Diffstat (limited to 'readme.md')
-rwxr-xr-xreadme.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index 12a7c63..26eadbd 100755
--- a/readme.md
+++ b/readme.md
@@ -137,6 +137,21 @@ Output: _(Note that while a double is returned, it can be outside the range of 0
40
```
+## Phonetic package
+Useful for indexing by word pronunciation and performing sounds-like comparisions. All metrics return a boolean value indicating if the two strings sound the same, per the algorithm used. All metrics have a algorithm counterpart which provide the means to perform indexing by word pronunciation.
+
+__Metaphone Metric:__
+```scala
+println(MetaphoneMetric.compare("merci", "mercy"))
+println(MetaphoneMetric.compare("dumb", "gum"))
+```
+
+Output:
+```shell
+true
+false
+```
+
## Testing
```shell
$ gradle :stringmetric-core:test