diff options
author | Rocky Madden <git@rockymadden.com> | 2013-03-12 14:45:48 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-03-12 14:45:48 -0600 |
commit | 36e7a56b2a9fc574e3fba4fd0c115750ceafe518 (patch) | |
tree | 0715b677ce69e129a2faba0d32748dd1554a25e1 /core/source | |
parent | 71f6fe9a9340870d46519a095bff75afef8d4118 (diff) | |
download | stringmetric-36e7a56b2a9fc574e3fba4fd0c115750ceafe518.tar.gz stringmetric-36e7a56b2a9fc574e3fba4fd0c115750ceafe518.tar.bz2 stringmetric-36e7a56b2a9fc574e3fba4fd0c115750ceafe518.zip |
Combined cases.
Diffstat (limited to 'core/source')
-rwxr-xr-x | core/source/core/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithm.scala | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/source/core/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithm.scala b/core/source/core/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithm.scala index 6da2dbc..c0b8be2 100755 --- a/core/source/core/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithm.scala +++ b/core/source/core/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithm.scala @@ -102,9 +102,7 @@ class MetaphoneAlgorithm extends StringAlgorithm[String] { case _ => (ca.head: @switch) match { case 'a' if (ca(1) == 'e') => ca.tail - case 'g' if (ca(1) == 'n') => ca.tail - case 'k' if (ca(1) == 'n') => ca.tail - case 'p' if (ca(1) == 'n') => ca.tail + case 'g' | 'k' | 'p' if (ca(1) == 'n') => ca.tail case 'w' if (ca(1) == 'r') => ca.tail case 'w' if (ca(1) == 'h') => 'w' +: ca.drop(2) case 'x' => 's' +: ca.tail |