diff options
author | Rocky Madden <git@rockymadden.com> | 2013-03-15 11:20:26 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-03-15 11:20:26 -0600 |
commit | 1ba756850a7d06dac4d6a35dd64268fafcf63f54 (patch) | |
tree | 19f51602b77543f2945aea46f761de99bb3be0a1 /core/source | |
parent | 21154a4e2a723e142297947c90dfaae983317687 (diff) | |
download | stringmetric-1ba756850a7d06dac4d6a35dd64268fafcf63f54.tar.gz stringmetric-1ba756850a7d06dac4d6a35dd64268fafcf63f54.tar.bz2 stringmetric-1ba756850a7d06dac4d6a35dd64268fafcf63f54.zip |
Shortened type and companion object aliases.
Diffstat (limited to 'core/source')
5 files changed, 104 insertions, 108 deletions
diff --git a/core/source/core/scala/com/rockymadden/stringmetric/ConfigurableStringAlgorithm.scala b/core/source/core/scala/com/rockymadden/stringmetric/ConfigurableStringAlgorithm.scala index 4c8958b..d447538 100755 --- a/core/source/core/scala/com/rockymadden/stringmetric/ConfigurableStringAlgorithm.scala +++ b/core/source/core/scala/com/rockymadden/stringmetric/ConfigurableStringAlgorithm.scala @@ -5,10 +5,10 @@ trait ConfigurableStringAlgorithm[R, O] extends ConfigurableAlgorithm[String, R, } object ConfigurableStringAlgorithm { - type NGramAlgorithm = com.rockymadden.stringmetric.similarity.NGramAlgorithm - val NGramAlgorithm = com.rockymadden.stringmetric.similarity.NGramAlgorithm + type NGram = com.rockymadden.stringmetric.similarity.NGramAlgorithm + val NGram = com.rockymadden.stringmetric.similarity.NGramAlgorithm - def computeWithNGram(charArray: Array[Char])(n: Int) = NGramAlgorithm.compute(charArray)(n) + def computeWithNGram(charArray: Array[Char])(n: Int) = NGram.compute(charArray)(n) - def computeWithNGram(string: String)(n: Int) = NGramAlgorithm.compute(string)(n) + def computeWithNGram(string: String)(n: Int) = NGram.compute(string)(n) } diff --git a/core/source/core/scala/com/rockymadden/stringmetric/ConfigurableStringMetric.scala b/core/source/core/scala/com/rockymadden/stringmetric/ConfigurableStringMetric.scala index 575134a..b2e933e 100755 --- a/core/source/core/scala/com/rockymadden/stringmetric/ConfigurableStringMetric.scala +++ b/core/source/core/scala/com/rockymadden/stringmetric/ConfigurableStringMetric.scala @@ -5,49 +5,48 @@ trait ConfigurableStringMetric[R, O] extends ConfigurableMetric[String, R, O] { } object ConfigurableStringMetric { - type DiceSorensenMetric = com.rockymadden.stringmetric.similarity.DiceSorensenMetric - val DiceSorensenMetric = com.rockymadden.stringmetric.similarity.DiceSorensenMetric + type DiceSorensen = com.rockymadden.stringmetric.similarity.DiceSorensenMetric + val DiceSorensen = com.rockymadden.stringmetric.similarity.DiceSorensenMetric - type JaccardMetric = com.rockymadden.stringmetric.similarity.JaccardMetric - val JaccardMetric = com.rockymadden.stringmetric.similarity.JaccardMetric + type Jaccard = com.rockymadden.stringmetric.similarity.JaccardMetric + val Jaccard = com.rockymadden.stringmetric.similarity.JaccardMetric - type NGramMetric = com.rockymadden.stringmetric.similarity.NGramMetric - val NGramMetric = com.rockymadden.stringmetric.similarity.NGramMetric + type NGram = com.rockymadden.stringmetric.similarity.NGramMetric + val NGram = com.rockymadden.stringmetric.similarity.NGramMetric - type OverlapMetric = com.rockymadden.stringmetric.similarity.OverlapMetric - val OverlapMetric = com.rockymadden.stringmetric.similarity.OverlapMetric + type Overlap = com.rockymadden.stringmetric.similarity.OverlapMetric + val Overlap = com.rockymadden.stringmetric.similarity.OverlapMetric - type WeightedLevenshteinMetric = com.rockymadden.stringmetric.similarity.WeightedLevenshteinMetric - val WeightedLevenshteinMetric = com.rockymadden.stringmetric.similarity.WeightedLevenshteinMetric + type WeightedLevenshtein = com.rockymadden.stringmetric.similarity.WeightedLevenshteinMetric + val WeightedLevenshtein = com.rockymadden.stringmetric.similarity.WeightedLevenshteinMetric def compareWithDiceSorensen(charArray1: Array[Char], charArray2: Array[Char])(n: Int) = - DiceSorensenMetric.compare(charArray1, charArray2)(n) + DiceSorensen.compare(charArray1, charArray2)(n) - def compareWithDiceSorensen(string1: String, string2: String)(n: Int) = - DiceSorensenMetric.compare(string1, string2)(n) + def compareWithDiceSorensen(string1: String, string2: String)(n: Int) = DiceSorensen.compare(string1, string2)(n) def compareWithJaccard(charArray1: Array[Char], charArray2: Array[Char])(n: Int) = - JaccardMetric.compare(charArray1, charArray2)(n) + Jaccard.compare(charArray1, charArray2)(n) - def compareWithJaccard(string1: String, string2: String)(n: Int) = JaccardMetric.compare(string1, string2)(n) + def compareWithJaccard(string1: String, string2: String)(n: Int) = Jaccard.compare(string1, string2)(n) def compareWithNGram(charArray1: Array[Char], charArray2: Array[Char])(n: Int) = - NGramMetric.compare(charArray1, charArray2)(n) + NGram.compare(charArray1, charArray2)(n) - def compareWithNGram(string1: String, string2: String)(n: Int) = NGramMetric.compare(string1, string2)(n) + def compareWithNGram(string1: String, string2: String)(n: Int) = NGram.compare(string1, string2)(n) def compareWithOverlap(charArray1: Array[Char], charArray2: Array[Char])(n: Int) = - OverlapMetric.compare(charArray1, charArray2)(n) + Overlap.compare(charArray1, charArray2)(n) - def compareWithOverlap(string1: String, string2: String)(n: Int) = OverlapMetric.compare(string1, string2)(n) + def compareWithOverlap(string1: String, string2: String)(n: Int) = Overlap.compare(string1, string2)(n) def compareWithWeightedLevenshtein(charArray1: Array[Char], charArray2: Array[Char]) (options: (BigDecimal, BigDecimal, BigDecimal)) = - WeightedLevenshteinMetric.compare(charArray1, charArray2)(options) + WeightedLevenshtein.compare(charArray1, charArray2)(options) def compareWithWeightedLevenshtein(string1: String, string2: String) (options: (BigDecimal, BigDecimal, BigDecimal)) = - WeightedLevenshteinMetric.compare(string1, string2)(options) + WeightedLevenshtein.compare(string1, string2)(options) } diff --git a/core/source/core/scala/com/rockymadden/stringmetric/StringAlgorithm.scala b/core/source/core/scala/com/rockymadden/stringmetric/StringAlgorithm.scala index d89a626..3c7a5b8 100755 --- a/core/source/core/scala/com/rockymadden/stringmetric/StringAlgorithm.scala +++ b/core/source/core/scala/com/rockymadden/stringmetric/StringAlgorithm.scala @@ -5,38 +5,38 @@ trait StringAlgorithm[R] extends Algorithm[String, R] { } object StringAlgorithm { - type MetaphoneAlgorithm = com.rockymadden.stringmetric.phonetic.MetaphoneAlgorithm - val MetaphoneAlgorithm = com.rockymadden.stringmetric.phonetic.MetaphoneAlgorithm + type Metaphone = com.rockymadden.stringmetric.phonetic.MetaphoneAlgorithm + val Metaphone = com.rockymadden.stringmetric.phonetic.MetaphoneAlgorithm - type NysiisAlgorithm = com.rockymadden.stringmetric.phonetic.NysiisAlgorithm - val NysiisAlgorithm = com.rockymadden.stringmetric.phonetic.NysiisAlgorithm + type Nysiis = com.rockymadden.stringmetric.phonetic.NysiisAlgorithm + val Nysiis = com.rockymadden.stringmetric.phonetic.NysiisAlgorithm - type RefinedNysiisAlgorithm = com.rockymadden.stringmetric.phonetic.RefinedNysiisAlgorithm - val RefinedNysiisAlgorithm = com.rockymadden.stringmetric.phonetic.RefinedNysiisAlgorithm + type RefinedNysiis = com.rockymadden.stringmetric.phonetic.RefinedNysiisAlgorithm + val RefinedNysiis = com.rockymadden.stringmetric.phonetic.RefinedNysiisAlgorithm - type RefinedSoundexAlgorithm = com.rockymadden.stringmetric.phonetic.RefinedSoundexAlgorithm - val RefinedSoundexAlgorithm = com.rockymadden.stringmetric.phonetic.RefinedSoundexAlgorithm + type RefinedSoundex = com.rockymadden.stringmetric.phonetic.RefinedSoundexAlgorithm + val RefinedSoundex = com.rockymadden.stringmetric.phonetic.RefinedSoundexAlgorithm - type SoundexAlgorithm = com.rockymadden.stringmetric.phonetic.SoundexAlgorithm - val SoundexAlgorithm = com.rockymadden.stringmetric.phonetic.SoundexAlgorithm + type Soundex = com.rockymadden.stringmetric.phonetic.SoundexAlgorithm + val Soundex = com.rockymadden.stringmetric.phonetic.SoundexAlgorithm - def computeWithMetaphone(charArray: Array[Char]) = MetaphoneAlgorithm.compute(charArray) + def computeWithMetaphone(charArray: Array[Char]) = Metaphone.compute(charArray) - def computeWithMetaphone(string: String) = MetaphoneAlgorithm.compute(string) + def computeWithMetaphone(string: String) = Metaphone.compute(string) - def computeWithNysiis(charArray: Array[Char]) = NysiisAlgorithm.compute(charArray) + def computeWithNysiis(charArray: Array[Char]) = Nysiis.compute(charArray) - def computeWithNysiis(string: String) = NysiisAlgorithm.compute(string) + def computeWithNysiis(string: String) = Nysiis.compute(string) - def computeWithRefinedNysiis(charArray: Array[Char]) = RefinedNysiisAlgorithm.compute(charArray) + def computeWithRefinedNysiis(charArray: Array[Char]) = RefinedNysiis.compute(charArray) - def computeWithRefinedNysiis(string: String) = RefinedNysiisAlgorithm.compute(string) + def computeWithRefinedNysiis(string: String) = RefinedNysiis.compute(string) - def computeWithRefinedSoundex(charArray: Array[Char]) = RefinedSoundexAlgorithm.compute(charArray) + def computeWithRefinedSoundex(charArray: Array[Char]) = RefinedSoundex.compute(charArray) - def computeWithRefinedSoundex(string: String) = RefinedSoundexAlgorithm.compute(string) + def computeWithRefinedSoundex(string: String) = RefinedSoundex.compute(string) - def computeWithSoundex(charArray: Array[Char]) = SoundexAlgorithm.compute(charArray) + def computeWithSoundex(charArray: Array[Char]) = Soundex.compute(charArray) - def computeWithSoundex(string: String) = SoundexAlgorithm.compute(string) + def computeWithSoundex(string: String) = Soundex.compute(string) } diff --git a/core/source/core/scala/com/rockymadden/stringmetric/StringFilter.scala b/core/source/core/scala/com/rockymadden/stringmetric/StringFilter.scala index d795f3f..2f90fb7 100755 --- a/core/source/core/scala/com/rockymadden/stringmetric/StringFilter.scala +++ b/core/source/core/scala/com/rockymadden/stringmetric/StringFilter.scala @@ -7,39 +7,39 @@ trait StringFilter extends Filter[String] with StringFilterable { } object StringFilter { - type AsciiControlStringFilter = com.rockymadden.stringmetric.filter.AsciiControlStringFilter - lazy val asciiControl = new StringFilterDelegate with AsciiControlStringFilter + type AsciiControl = com.rockymadden.stringmetric.filter.AsciiControlStringFilter + lazy val asciiControl = new StringFilterDelegate with AsciiControl - type AsciiControlOnlyStringFilter = com.rockymadden.stringmetric.filter.AsciiControlOnlyStringFilter - lazy val asciiControlOnly = new StringFilterDelegate with AsciiControlOnlyStringFilter + type AsciiControlOnly = com.rockymadden.stringmetric.filter.AsciiControlOnlyStringFilter + lazy val asciiControlOnly = new StringFilterDelegate with AsciiControlOnly - type AsciiLetterCaseStringFilter = com.rockymadden.stringmetric.filter.AsciiLetterCaseStringFilter - lazy val asciiLetterCase = new StringFilterDelegate with AsciiLetterCaseStringFilter + type AsciiLetterCase = com.rockymadden.stringmetric.filter.AsciiLetterCaseStringFilter + lazy val asciiLetterCase = new StringFilterDelegate with AsciiLetterCase - type AsciiLetterNumberStringFilter = com.rockymadden.stringmetric.filter.AsciiLetterNumberStringFilter - lazy val asciiLetterNumber = new StringFilterDelegate with AsciiLetterNumberStringFilter + type AsciiLetterNumber = com.rockymadden.stringmetric.filter.AsciiLetterNumberStringFilter + lazy val asciiLetterNumber = new StringFilterDelegate with AsciiLetterNumber - type AsciiLetterNumberOnlyStringFilter = com.rockymadden.stringmetric.filter.AsciiLetterNumberOnlyStringFilter - lazy val asciiLetterNumberOnly = new StringFilterDelegate with AsciiLetterNumberOnlyStringFilter + type AsciiLetterNumberOnly = com.rockymadden.stringmetric.filter.AsciiLetterNumberOnlyStringFilter + lazy val asciiLetterNumberOnly = new StringFilterDelegate with AsciiLetterNumberOnly - type AsciiLetterStringFilter = com.rockymadden.stringmetric.filter.AsciiLetterStringFilter - lazy val asciiLetter = new StringFilterDelegate with AsciiLetterStringFilter + type AsciiLetter = com.rockymadden.stringmetric.filter.AsciiLetterStringFilter + lazy val asciiLetter = new StringFilterDelegate with AsciiLetter - type AsciiLetterOnlyStringFilter = com.rockymadden.stringmetric.filter.AsciiLetterOnlyStringFilter - lazy val asciiLetterOnly = new StringFilterDelegate with AsciiLetterOnlyStringFilter + type AsciiLetterOnly = com.rockymadden.stringmetric.filter.AsciiLetterOnlyStringFilter + lazy val asciiLetterOnly = new StringFilterDelegate with AsciiLetterOnly - type AsciiNumberStringFilter = com.rockymadden.stringmetric.filter.AsciiNumberStringFilter - lazy val asciiNumber = new StringFilterDelegate with AsciiNumberStringFilter + type AsciiNumber = com.rockymadden.stringmetric.filter.AsciiNumberStringFilter + lazy val asciiNumber = new StringFilterDelegate with AsciiNumber - type AsciiNumberOnlyStringFilter = com.rockymadden.stringmetric.filter.AsciiNumberOnlyStringFilter - lazy val asciiNumberOnly = new StringFilterDelegate with AsciiNumberOnlyStringFilter + type AsciiNumberOnly = com.rockymadden.stringmetric.filter.AsciiNumberOnlyStringFilter + lazy val asciiNumberOnly = new StringFilterDelegate with AsciiNumberOnly - type AsciiSpaceStringFilter = com.rockymadden.stringmetric.filter.AsciiSpaceStringFilter - lazy val asciiSpace = new StringFilterDelegate with AsciiSpaceStringFilter + type AsciiSpace = com.rockymadden.stringmetric.filter.AsciiSpaceStringFilter + lazy val asciiSpace = new StringFilterDelegate with AsciiSpace - type AsciiSymbolStringFilter = com.rockymadden.stringmetric.filter.AsciiSymbolStringFilter - lazy val asciiSymbol = new StringFilterDelegate with AsciiSymbolStringFilter + type AsciiSymbol = com.rockymadden.stringmetric.filter.AsciiSymbolStringFilter + lazy val asciiSymbol = new StringFilterDelegate with AsciiSymbol - type AsciiSymbolOnlyStringFilter = com.rockymadden.stringmetric.filter.AsciiSymbolOnlyStringFilter - lazy val asciiSymbolOnly = new StringFilterDelegate with AsciiSymbolOnlyStringFilter + type AsciiSymbolOnly = com.rockymadden.stringmetric.filter.AsciiSymbolOnlyStringFilter + lazy val asciiSymbolOnly = new StringFilterDelegate with AsciiSymbolOnly } diff --git a/core/source/core/scala/com/rockymadden/stringmetric/StringMetric.scala b/core/source/core/scala/com/rockymadden/stringmetric/StringMetric.scala index b66b218..804e2d4 100755 --- a/core/source/core/scala/com/rockymadden/stringmetric/StringMetric.scala +++ b/core/source/core/scala/com/rockymadden/stringmetric/StringMetric.scala @@ -5,74 +5,71 @@ trait StringMetric[R] extends Metric[String, R] { } object StringMetric { - type HammingMetric = com.rockymadden.stringmetric.similarity.HammingMetric - val HammingMetric = com.rockymadden.stringmetric.similarity.HammingMetric + type Hamming = com.rockymadden.stringmetric.similarity.HammingMetric + val Hamming = com.rockymadden.stringmetric.similarity.HammingMetric - type JaroMetric = com.rockymadden.stringmetric.similarity.JaroMetric - val JaroMetric = com.rockymadden.stringmetric.similarity.JaroMetric + type Jaro = com.rockymadden.stringmetric.similarity.JaroMetric + val Jaro = com.rockymadden.stringmetric.similarity.JaroMetric - type JaroWinklerMetric = com.rockymadden.stringmetric.similarity.JaroWinklerMetric - val JaroWinklerMetric = com.rockymadden.stringmetric.similarity.JaroWinklerMetric + type JaroWinkler = com.rockymadden.stringmetric.similarity.JaroWinklerMetric + val JaroWinkler = com.rockymadden.stringmetric.similarity.JaroWinklerMetric - type LevenshteinMetric = com.rockymadden.stringmetric.similarity.LevenshteinMetric - val LevenshteinMetric = com.rockymadden.stringmetric.similarity.LevenshteinMetric + type Levenshtein = com.rockymadden.stringmetric.similarity.LevenshteinMetric + val Levenshtein = com.rockymadden.stringmetric.similarity.LevenshteinMetric - type MetaphoneMetric = com.rockymadden.stringmetric.phonetic.MetaphoneMetric - val MetaphoneMetric = com.rockymadden.stringmetric.phonetic.MetaphoneMetric + type Metaphone = com.rockymadden.stringmetric.phonetic.MetaphoneMetric + val Metaphone = com.rockymadden.stringmetric.phonetic.MetaphoneMetric - type NysiisMetric = com.rockymadden.stringmetric.phonetic.NysiisMetric - val NysiisMetric = com.rockymadden.stringmetric.phonetic.NysiisMetric + type Nysiis = com.rockymadden.stringmetric.phonetic.NysiisMetric + val Nysiis = com.rockymadden.stringmetric.phonetic.NysiisMetric - type RefinedNysiisMetric = com.rockymadden.stringmetric.phonetic.RefinedNysiisMetric - val RefinedNysiisMetric = com.rockymadden.stringmetric.phonetic.RefinedNysiisMetric + type RefinedNysiis = com.rockymadden.stringmetric.phonetic.RefinedNysiisMetric + val RefinedNysiis = com.rockymadden.stringmetric.phonetic.RefinedNysiisMetric - type RefinedSoundexMetric = com.rockymadden.stringmetric.phonetic.RefinedSoundexMetric - val RefinedSoundexMetric = com.rockymadden.stringmetric.phonetic.RefinedSoundexMetric + type RefinedSoundex = com.rockymadden.stringmetric.phonetic.RefinedSoundexMetric + val RefinedSoundex = com.rockymadden.stringmetric.phonetic.RefinedSoundexMetric - type SoundexMetric = com.rockymadden.stringmetric.phonetic.SoundexMetric - val SoundexMetric = com.rockymadden.stringmetric.phonetic.SoundexMetric + type Soundex = com.rockymadden.stringmetric.phonetic.SoundexMetric + val Soundex = com.rockymadden.stringmetric.phonetic.SoundexMetric - def compareWithHamming(charArray1: Array[Char], charArray2: Array[Char]) = - HammingMetric.compare(charArray1, charArray2) + def compareWithHamming(charArray1: Array[Char], charArray2: Array[Char]) = Hamming.compare(charArray1, charArray2) - def compareWithHamming(string1: String, string2: String)= HammingMetric.compare(string1, string2) + def compareWithHamming(string1: String, string2: String)= Hamming.compare(string1, string2) - def compareWithJaro(charArray1: Array[Char], charArray2: Array[Char]) = JaroMetric.compare(charArray1, charArray2) + def compareWithJaro(charArray1: Array[Char], charArray2: Array[Char]) = Jaro.compare(charArray1, charArray2) - def compareWithJaro(string1: String, string2: String) = JaroMetric.compare(string1, string2) + def compareWithJaro(string1: String, string2: String) = Jaro.compare(string1, string2) def compareWithJaroWinkler(charArray1: Array[Char], charArray2: Array[Char]) = - JaroWinklerMetric.compare(charArray1, charArray2) + JaroWinkler.compare(charArray1, charArray2) - def compareWithJaroWinkler(string1: String, string2: String) = JaroWinklerMetric.compare(string1, string2) + def compareWithJaroWinkler(string1: String, string2: String) = JaroWinkler.compare(string1, string2) def compareWithLevenshtein(charArray1: Array[Char], charArray2: Array[Char]) = - LevenshteinMetric.compare(charArray1, charArray2) + Levenshtein.compare(charArray1, charArray2) - def compareWithLevenshtein(string1: String, string2: String) = LevenshteinMetric.compare(string1, string2) + def compareWithLevenshtein(string1: String, string2: String) = Levenshtein.compare(string1, string2) def compareWithMetaphone(charArray1: Array[Char], charArray2: Array[Char]) = - MetaphoneMetric.compare(charArray1, charArray2) + Metaphone.compare(charArray1, charArray2) - def compareWithMetaphone(string1: String, string2: String) = MetaphoneMetric.compare(string1, string2) + def compareWithMetaphone(string1: String, string2: String) = Metaphone.compare(string1, string2) - def compareWithNysiis(charArray1: Array[Char], charArray2: Array[Char]) = - NysiisMetric.compare(charArray1, charArray2) + def compareWithNysiis(charArray1: Array[Char], charArray2: Array[Char]) = Nysiis.compare(charArray1, charArray2) - def compareWithNysiis(string1: String, string2: String) = NysiisMetric.compare(string1, string2) + def compareWithNysiis(string1: String, string2: String) = Nysiis.compare(string1, string2) def compareWithRefinedNysiis(charArray1: Array[Char], charArray2: Array[Char]) = - RefinedNysiisMetric.compare(charArray1, charArray2) + RefinedNysiis.compare(charArray1, charArray2) - def compareWithRefinedNysiis(string1: String, string2: String) = RefinedNysiisMetric.compare(string1, string2) + def compareWithRefinedNysiis(string1: String, string2: String) = RefinedNysiis.compare(string1, string2) def compareWithRefinedSoundex(charArray1: Array[Char], charArray2: Array[Char]) = - RefinedSoundexMetric.compare(charArray1, charArray2) + RefinedSoundex.compare(charArray1, charArray2) - def compareWithRefinedSoundex(string1: String, string2: String) = RefinedSoundexMetric.compare(string1, string2) + def compareWithRefinedSoundex(string1: String, string2: String) = RefinedSoundex.compare(string1, string2) - def compareWithSoundex(charArray1: Array[Char], charArray2: Array[Char]) = - SoundexMetric.compare(charArray1, charArray2) + def compareWithSoundex(charArray1: Array[Char], charArray2: Array[Char]) = Soundex.compare(charArray1, charArray2) - def compareWithSoundex(string1: String, string2: String) = SoundexMetric.compare(string1, string2) + def compareWithSoundex(string1: String, string2: String) = Soundex.compare(string1, string2) } |