diff options
author | Rocky Madden <git@rockymadden.com> | 2013-01-23 14:15:18 -0700 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-01-23 14:15:18 -0700 |
commit | 1641306557c9cf0b283dfe39fd2c51bf4c76baba (patch) | |
tree | cb613b80194696d9a9958f120d124a7a3b7083ea | |
parent | f7ea57ca37a26040b64a2ef17b76647ae1760a1a (diff) | |
download | stringmetric-1641306557c9cf0b283dfe39fd2c51bf4c76baba.tar.gz stringmetric-1641306557c9cf0b283dfe39fd2c51bf4c76baba.tar.bz2 stringmetric-1641306557c9cf0b283dfe39fd2c51bf4c76baba.zip |
Added Metaphone examples.
-rwxr-xr-x | readme.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 |