diff options
Diffstat (limited to 'cli/source')
4 files changed, 8 insertions, 8 deletions
diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/jaroMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/jaroMetric.scala index ba061c7..f633322 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/jaroMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/jaroMetric.scala @@ -1,6 +1,6 @@ package org.hashtree.stringmetric.cli.command -import org.hashtree.stringmetric.JaroMetric +import org.hashtree.stringmetric.{ CaseStringCleaner, JaroMetric, StringCleanerDelegate } import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.cli.command._ @@ -47,6 +47,6 @@ object jaroMetric extends Command { override def execute(options: OptionMap): Unit = { val strings = options('dashless).split(" ") - println(JaroMetric.compare(strings(0), strings(1)).toString) + println(JaroMetric.compare(strings(0), strings(1))(new StringCleanerDelegate with CaseStringCleaner).toString) } }
\ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/jaroWinklerMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/jaroWinklerMetric.scala index 63ab69c..8590ac9 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/jaroWinklerMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/jaroWinklerMetric.scala @@ -1,6 +1,6 @@ package org.hashtree.stringmetric.cli.command -import org.hashtree.stringmetric.JaroWinklerMetric +import org.hashtree.stringmetric.{ CaseStringCleaner, JaroWinklerMetric, StringCleanerDelegate } import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.cli.command._ @@ -47,6 +47,6 @@ object jaroWinklerMetric extends Command { override def execute(options: OptionMap): Unit = { val strings = options('dashless).split(" ") - println(JaroWinklerMetric.compare(strings(0), strings(1)).toString) + println(JaroWinklerMetric.compare(strings(0), strings(1))(new StringCleanerDelegate with CaseStringCleaner).toString) } }
\ No newline at end of file diff --git a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/jaroMetricSpec.scala b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/jaroMetricSpec.scala index d3eabe0..87544e8 100755 --- a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/jaroMetricSpec.scala +++ b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/jaroMetricSpec.scala @@ -13,14 +13,14 @@ final class jaroMetricSpec extends ScalaTest { val out = new java.io.ByteArrayOutputStream() Console.withOut(out)( - jaroMetric.main(Array("--unitTest", "--debug", "abc", "abc")) + jaroMetric.main(Array("--unitTest", "--debug", "aBc", "abc")) ) out.toString should equal ("1.0\n") out.reset() Console.withOut(out)( - jaroMetric.main(Array("--unitTest", "--debug", "abc", "xyz")) + jaroMetric.main(Array("--unitTest", "--debug", "aBc", "xyz")) ) out.toString should equal ("0.0\n") diff --git a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/jaroWinklerMetricSpec.scala b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/jaroWinklerMetricSpec.scala index 071454a..02f9340 100755 --- a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/jaroWinklerMetricSpec.scala +++ b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/jaroWinklerMetricSpec.scala @@ -13,14 +13,14 @@ final class jaroWinklerMetricSpec extends ScalaTest { val out = new java.io.ByteArrayOutputStream() Console.withOut(out)( - jaroWinklerMetric.main(Array("--unitTest", "--debug", "abc", "abc")) + jaroWinklerMetric.main(Array("--unitTest", "--debug", "aBc", "abc")) ) out.toString should equal ("1.0\n") out.reset() Console.withOut(out)( - jaroWinklerMetric.main(Array("--unitTest", "--debug", "abc", "xyz")) + jaroWinklerMetric.main(Array("--unitTest", "--debug", "aBc", "xyz")) ) out.toString should equal ("0.0\n") |