summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorRocky Madden <git@rockymadden.com>2012-11-02 08:33:47 -0600
committerRocky Madden <git@rockymadden.com>2012-11-02 08:33:47 -0600
commit0127cd5810120decef96d3928d3f9f6e75daaee4 (patch)
treee3fb82eebf4801a2c2b3fd7360b106b2f193660c /readme.md
parent9afb69d19a20ed2447b56bbd9c9c7b9552103d90 (diff)
downloadstringmetric-0127cd5810120decef96d3928d3f9f6e75daaee4.tar.gz
stringmetric-0127cd5810120decef96d3928d3f9f6e75daaee4.tar.bz2
stringmetric-0127cd5810120decef96d3928d3f9f6e75daaee4.zip
Added convenience object examples.
Diffstat (limited to 'readme.md')
-rwxr-xr-xreadme.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index bcda7cf..1d2d054 100755
--- a/readme.md
+++ b/readme.md
@@ -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