From 6ceea492bacd491a93c77195eef4c3f5856e2fcd Mon Sep 17 00:00:00 2001 From: Rocky Madden Date: Wed, 14 Nov 2012 15:45:59 -0700 Subject: Moved StringFilterDelegate into filter package, as it is essentially a concretion. --- .../org/hashtree/stringmetric/cli/phonetic/metaphoneAlgorithm.scala | 3 +-- .../scala/org/hashtree/stringmetric/cli/phonetic/metaphoneMetric.scala | 3 +-- .../scala/org/hashtree/stringmetric/cli/phonetic/nysiisAlgorithm.scala | 3 +-- .../scala/org/hashtree/stringmetric/cli/phonetic/nysiisMetric.scala | 3 +-- .../hashtree/stringmetric/cli/phonetic/refinedSoundexAlgorithm.scala | 3 +-- .../org/hashtree/stringmetric/cli/phonetic/refinedSoundexMetric.scala | 3 +-- .../org/hashtree/stringmetric/cli/phonetic/soundexAlgorithm.scala | 3 +-- .../scala/org/hashtree/stringmetric/cli/phonetic/soundexMetric.scala | 3 +-- .../org/hashtree/stringmetric/cli/similarity/diceSorensenMetric.scala | 3 +-- .../scala/org/hashtree/stringmetric/cli/similarity/hammingMetric.scala | 3 +-- .../scala/org/hashtree/stringmetric/cli/similarity/jaroMetric.scala | 3 +-- .../org/hashtree/stringmetric/cli/similarity/jaroWinklerMetric.scala | 3 +-- .../org/hashtree/stringmetric/cli/similarity/levenshteinMetric.scala | 3 +-- .../org/hashtree/stringmetric/cli/similarity/nGramAlgorithm.scala | 3 +-- .../scala/org/hashtree/stringmetric/cli/similarity/nGramMetric.scala | 3 +-- .../stringmetric/cli/similarity/weightedLevenshteinMetric.scala | 3 +-- 16 files changed, 16 insertions(+), 32 deletions(-) (limited to 'cli') diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/metaphoneAlgorithm.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/metaphoneAlgorithm.scala index fc23695..29095c0 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/metaphoneAlgorithm.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/metaphoneAlgorithm.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.phonetic -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.phonetic.MetaphoneAlgorithm @@ -46,6 +45,6 @@ object metaphoneAlgorithm extends Command { println( MetaphoneAlgorithm.compute( options('dashless) - )(new StringFilterDelegate).getOrElse("not computable").toString + ).getOrElse("not computable").toString ) } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/metaphoneMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/metaphoneMetric.scala index 683fc9e..24c58b4 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/metaphoneMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/metaphoneMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.phonetic -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.phonetic.MetaphoneMetric @@ -49,7 +48,7 @@ object metaphoneMetric extends Command { MetaphoneMetric.compare( strings(0), strings(1) - )(new StringFilterDelegate).getOrElse("not comparable").toString + ).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/nysiisAlgorithm.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/nysiisAlgorithm.scala index c9c9656..2cb2888 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/nysiisAlgorithm.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/nysiisAlgorithm.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.phonetic -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.phonetic.NysiisAlgorithm @@ -46,6 +45,6 @@ object nysiisAlgorithm extends Command { println( NysiisAlgorithm.compute( options('dashless) - )(new StringFilterDelegate).getOrElse("not computable").toString + ).getOrElse("not computable").toString ) } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/nysiisMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/nysiisMetric.scala index da83a35..cbac34d 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/nysiisMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/nysiisMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.phonetic -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.phonetic.NysiisMetric @@ -49,7 +48,7 @@ object nysiisMetric extends Command { NysiisMetric.compare( strings(0), strings(1) - )(new StringFilterDelegate).getOrElse("not comparable").toString + ).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/refinedSoundexAlgorithm.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/refinedSoundexAlgorithm.scala index 00c7900..30da5d3 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/refinedSoundexAlgorithm.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/refinedSoundexAlgorithm.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.phonetic -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.phonetic.RefinedSoundexAlgorithm @@ -46,6 +45,6 @@ object refinedSoundexAlgorithm extends Command { println( RefinedSoundexAlgorithm.compute( options('dashless) - )(new StringFilterDelegate).getOrElse("not computable").toString + ).getOrElse("not computable").toString ) } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/refinedSoundexMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/refinedSoundexMetric.scala index 9a504b5..c2a1f67 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/refinedSoundexMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/refinedSoundexMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.phonetic -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.phonetic.RefinedSoundexMetric @@ -49,7 +48,7 @@ object refinedSoundexMetric extends Command { RefinedSoundexMetric.compare( strings(0), strings(1) - )(new StringFilterDelegate).getOrElse("not comparable").toString + ).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/soundexAlgorithm.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/soundexAlgorithm.scala index 64b4997..4144800 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/soundexAlgorithm.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/soundexAlgorithm.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.phonetic -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.phonetic.SoundexAlgorithm @@ -46,6 +45,6 @@ object soundexAlgorithm extends Command { println( SoundexAlgorithm.compute( options('dashless) - )(new StringFilterDelegate).getOrElse("not computable").toString + ).getOrElse("not computable").toString ) } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/soundexMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/soundexMetric.scala index a06db9a..db9632d 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/soundexMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/phonetic/soundexMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.phonetic -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.phonetic.SoundexMetric @@ -49,7 +48,7 @@ object soundexMetric extends Command { SoundexMetric.compare( strings(0), strings(1) - )(new StringFilterDelegate).getOrElse("not comparable").toString + ).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/diceSorensenMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/diceSorensenMetric.scala index 3c5a8b1..5d6590c 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/diceSorensenMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/diceSorensenMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.similarity -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.similarity.DiceSorensenMetric @@ -54,7 +53,7 @@ object diceSorensenMetric extends Command { DiceSorensenMetric.compare( strings(0), strings(1) - )(n)(new StringFilterDelegate).getOrElse("not comparable").toString + )(n).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/hammingMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/hammingMetric.scala index fc3b476..77af8b5 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/hammingMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/hammingMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.similarity -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.similarity.HammingMetric @@ -49,7 +48,7 @@ object hammingMetric extends Command { HammingMetric.compare( strings(0), strings(1) - )(new StringFilterDelegate).getOrElse("not comparable").toString + ).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/jaroMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/jaroMetric.scala index 64979ba..43a05ac 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/jaroMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/jaroMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.similarity -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.similarity.JaroMetric @@ -46,7 +45,7 @@ object jaroMetric extends Command { JaroMetric.compare( strings(0), strings(1) - )(new StringFilterDelegate).getOrElse("not comparable").toString + ).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/jaroWinklerMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/jaroWinklerMetric.scala index 09d875b..76549c0 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/jaroWinklerMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/jaroWinklerMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.similarity -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.similarity.JaroWinklerMetric @@ -49,7 +48,7 @@ object jaroWinklerMetric extends Command { JaroWinklerMetric.compare( strings(0), strings(1) - )(new StringFilterDelegate).getOrElse("not comparable").toString + ).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/levenshteinMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/levenshteinMetric.scala index 900edc0..cfc193b 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/levenshteinMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/levenshteinMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.similarity -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.similarity.LevenshteinMetric @@ -50,7 +49,7 @@ object levenshteinMetric extends Command { LevenshteinMetric.compare( strings(0), strings(1) - )(new StringFilterDelegate).getOrElse("not comparable").toString + ).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/nGramAlgorithm.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/nGramAlgorithm.scala index 3aae788..555efbf 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/nGramAlgorithm.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/nGramAlgorithm.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.similarity -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.similarity.NGramAlgorithm @@ -47,7 +46,7 @@ object nGramAlgorithm extends Command { override def execute(options: OptionMap): Unit = { val n = ParseUtility.parseInt(options('n)).get - val ngram = NGramAlgorithm.compute(options('dashless))(n)(new StringFilterDelegate) + val ngram = NGramAlgorithm.compute(options('dashless))(n) ngram match { case Some(a) => println(a.mkString("|")) diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/nGramMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/nGramMetric.scala index 964a11a..eeb574a 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/nGramMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/nGramMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.similarity -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.similarity.NGramMetric @@ -54,7 +53,7 @@ object nGramMetric extends Command { NGramMetric.compare( strings(0), strings(1) - )(n)(new StringFilterDelegate).getOrElse("not comparable").toString + )(n).getOrElse("not comparable").toString ) } } \ No newline at end of file diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/weightedLevenshteinMetric.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/weightedLevenshteinMetric.scala index 60056e3..1e686f7 100755 --- a/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/weightedLevenshteinMetric.scala +++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/similarity/weightedLevenshteinMetric.scala @@ -1,6 +1,5 @@ package org.hashtree.stringmetric.cli.similarity -import org.hashtree.stringmetric.StringFilterDelegate import org.hashtree.stringmetric.cli._ import org.hashtree.stringmetric.similarity.WeightedLevenshteinMetric import scala.math.BigDecimal @@ -67,7 +66,7 @@ object weightedLevenshteinMetric extends Command { WeightedLevenshteinMetric.compare( strings(0), strings(1) - )(weights)(new StringFilterDelegate).getOrElse("not comparable").toString + )(weights).getOrElse("not comparable").toString ) } } \ No newline at end of file -- cgit v1.2.3