diff options
author | Rocky Madden <git@rockymadden.com> | 2012-11-02 08:33:47 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2012-11-02 08:33:47 -0600 |
commit | 0127cd5810120decef96d3928d3f9f6e75daaee4 (patch) | |
tree | e3fb82eebf4801a2c2b3fd7360b106b2f193660c /readme.md | |
parent | 9afb69d19a20ed2447b56bbd9c9c7b9552103d90 (diff) | |
download | stringmetric-0127cd5810120decef96d3928d3f9f6e75daaee4.tar.gz stringmetric-0127cd5810120decef96d3928d3f9f6e75daaee4.tar.bz2 stringmetric-0127cd5810120decef96d3928d3f9f6e75daaee4.zip |
Added convenience object examples.
Diffstat (limited to 'readme.md')
-rwxr-xr-x | readme.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -69,6 +69,20 @@ gradle :stringmetric-cli:tar ``` ## Using the API +The absolute easiest example is to use the StringMetric convenience object. +```scala +import org.hashtree.stringmetric.StringMetric + +if (StringMetric.compareJaroWinkler("string1", "string2") >= 0.9) println("It's likely you're a match!") +``` + +The absolute easiest example with one filter is to use the StringMetric and StringFilter convenience objects. +```scala +import org.hashtree.stringmetric.StringMetric + +if (StringMetric.compareJaroWinkler("string1", "string2")(StringFilter.asciiLetterCase) >= 0.9) println("It's likely you're a match!") +``` + Simple example. Import metric, compare, do something with result. ```scala import org.hashtree.stringmetric.similarity.JaroWinklerMetric |