diff options
author | Rocky Madden <git@rockymadden.com> | 2013-03-12 17:58:02 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-03-12 17:58:02 -0600 |
commit | d781f0b5787ac2b39f0a28c9df8c67902c971148 (patch) | |
tree | 96f3e2cd1f3bb9318b1c973afa7efcfe9b4b131e | |
parent | b848cf2945b0be8d9fad0e81d98deda78e7443dd (diff) | |
download | stringmetric-d781f0b5787ac2b39f0a28c9df8c67902c971148.tar.gz stringmetric-d781f0b5787ac2b39f0a28c9df8c67902c971148.tar.bz2 stringmetric-d781f0b5787ac2b39f0a28c9df8c67902c971148.zip |
Added overlap metric examples.
-rwxr-xr-x | readme.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -181,6 +181,20 @@ Array("abc", "bcd", "cde", "def", "efg", "fgh", "ghi", "hij", "ijk", "jkl", "klm --- +__Overlap Metric:__ _(Note you must specify the size of the n-gram you wish to use. This can be done implicitly.)_ +```scala +println(OverlapMetric.compare("night", "nacht")(1)) +println(OverlapMetric.compare("context", "contact")(1)) +``` + +Output: +``` +0.6 +0.7142857142857143 +``` + +--- + __Ratcliff/Obershelp Metric:__ ```scala println(RatcliffObershelpMetric.compare("aleksander", "alexandre")) |