summaryrefslogtreecommitdiff
path: root/cli/source
diff options
context:
space:
mode:
authorRocky Madden <git@rockymadden.com>2012-10-29 17:19:43 -0600
committerRocky Madden <git@rockymadden.com>2012-10-29 17:19:43 -0600
commit9e8964fbe63e412f4327543126be9105e1fc45a9 (patch)
tree0bf7578baec454d6971b7656790e8c97a304f20f /cli/source
parent57d12c2e1dc0104fec0611e1bc1af0afcd7d3a12 (diff)
downloadstringmetric-9e8964fbe63e412f4327543126be9105e1fc45a9.tar.gz
stringmetric-9e8964fbe63e412f4327543126be9105e1fc45a9.tar.bz2
stringmetric-9e8964fbe63e412f4327543126be9105e1fc45a9.zip
Appended algorithm to names to help diferentiate between metrics and phonetic algorithms.
Diffstat (limited to 'cli/source')
-rwxr-xr-xcli/source/core/scala/org/hashtree/stringmetric/cli/command/metaphoneAlgorithm.scala (renamed from cli/source/core/scala/org/hashtree/stringmetric/cli/command/metaphone.scala)10
-rwxr-xr-xcli/source/core/scala/org/hashtree/stringmetric/cli/command/nysiisAlgorithm.scala (renamed from cli/source/core/scala/org/hashtree/stringmetric/cli/command/nysiis.scala)10
-rwxr-xr-xcli/source/core/scala/org/hashtree/stringmetric/cli/command/refinedSoundexAlgorithm.scala (renamed from cli/source/core/scala/org/hashtree/stringmetric/cli/command/refinedSoundex.scala)10
-rwxr-xr-xcli/source/core/scala/org/hashtree/stringmetric/cli/command/soundexAlgorithm.scala (renamed from cli/source/core/scala/org/hashtree/stringmetric/cli/command/soundex.scala)10
-rwxr-xr-xcli/source/test/scala/org/hashtree/stringmetric/cli/command/metaphoneAlgorithmSpec.scala (renamed from cli/source/test/scala/org/hashtree/stringmetric/cli/command/metaphoneSpec.scala)10
-rwxr-xr-xcli/source/test/scala/org/hashtree/stringmetric/cli/command/nysiisAlgorithmSpec.scala (renamed from cli/source/test/scala/org/hashtree/stringmetric/cli/command/nysiisSpec.scala)10
-rwxr-xr-xcli/source/test/scala/org/hashtree/stringmetric/cli/command/refinedSoundexAlgorithmSpec.scala (renamed from cli/source/test/scala/org/hashtree/stringmetric/cli/command/refinedSoundexSpec.scala)10
-rwxr-xr-xcli/source/test/scala/org/hashtree/stringmetric/cli/command/soundexAlgorithmSpec.scala (renamed from cli/source/test/scala/org/hashtree/stringmetric/cli/command/soundexSpec.scala)10
8 files changed, 40 insertions, 40 deletions
diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/metaphone.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/metaphoneAlgorithm.scala
index c915a84..50f2e8f 100755
--- a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/metaphone.scala
+++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/metaphoneAlgorithm.scala
@@ -3,13 +3,13 @@ package org.hashtree.stringmetric.cli.command
import org.hashtree.stringmetric.StringFilterDelegate
import org.hashtree.stringmetric.cli._
import org.hashtree.stringmetric.cli.command._
-import org.hashtree.stringmetric.phonetic.Metaphone
+import org.hashtree.stringmetric.phonetic.MetaphoneAlgorithm
/**
- * The Metaphone [[org.hashtree.stringmetric.cli.command.Command]]. Returns the phonetic representation of the
+ * The metaphoneAlgorithm [[org.hashtree.stringmetric.cli.command.Command]]. Returns the phonetic representation of the
* passed string, per the Metaphone algorithm.
*/
-object metaphone extends Command {
+object metaphoneAlgorithm extends Command {
override def main(args: Array[String]): Unit = {
val options = OptionMapUtility.toOptionMap(args)
@@ -36,7 +36,7 @@ object metaphone extends Command {
println(
"Returns the phonetic representation of the passed string, per the Metaphone algorithm." + ls + ls +
"Syntax:" + ls +
- tab + "metaphone [Options] string..." + ls + ls +
+ tab + "metaphoneAlgorithm [Options] string..." + ls + ls +
"Options:" + ls +
tab + "-h, --help" + ls +
tab + tab + "Outputs description, syntax, and options."
@@ -45,7 +45,7 @@ object metaphone extends Command {
override def execute(options: OptionMap): Unit =
println(
- Metaphone.compute(
+ MetaphoneAlgorithm.compute(
options('dashless)
)(new StringFilterDelegate).getOrElse("not computable").toString
)
diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/nysiis.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/nysiisAlgorithm.scala
index f9f624e..b4f4130 100755
--- a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/nysiis.scala
+++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/nysiisAlgorithm.scala
@@ -3,13 +3,13 @@ package org.hashtree.stringmetric.cli.command
import org.hashtree.stringmetric.StringFilterDelegate
import org.hashtree.stringmetric.cli._
import org.hashtree.stringmetric.cli.command._
-import org.hashtree.stringmetric.phonetic.Nysiis
+import org.hashtree.stringmetric.phonetic.NysiisAlgorithm
/**
- * The NYSIIS [[org.hashtree.stringmetric.cli.command.Command]]. Returns the phonetic representation of the
+ * The nysiisAlgorithm [[org.hashtree.stringmetric.cli.command.Command]]. Returns the phonetic representation of the
* passed string, per the NYSIIS algorithm.
*/
-object nysiis extends Command {
+object nysiisAlgorithm extends Command {
override def main(args: Array[String]): Unit = {
val options = OptionMapUtility.toOptionMap(args)
@@ -36,7 +36,7 @@ object nysiis extends Command {
println(
"Returns the phonetic representation of the passed string, per the NYSIIS algorithm." + ls + ls +
"Syntax:" + ls +
- tab + "nysiis [Options] string..." + ls + ls +
+ tab + "nysiisAlgorithm [Options] string..." + ls + ls +
"Options:" + ls +
tab + "-h, --help" + ls +
tab + tab + "Outputs description, syntax, and options."
@@ -45,7 +45,7 @@ object nysiis extends Command {
override def execute(options: OptionMap): Unit =
println(
- Nysiis.compute(
+ NysiisAlgorithm.compute(
options('dashless)
)(new StringFilterDelegate).getOrElse("not computable").toString
)
diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/refinedSoundex.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/refinedSoundexAlgorithm.scala
index f1b4123..d935e71 100755
--- a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/refinedSoundex.scala
+++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/refinedSoundexAlgorithm.scala
@@ -3,13 +3,13 @@ package org.hashtree.stringmetric.cli.command
import org.hashtree.stringmetric.StringFilterDelegate
import org.hashtree.stringmetric.cli._
import org.hashtree.stringmetric.cli.command._
-import org.hashtree.stringmetric.phonetic.RefinedSoundex
+import org.hashtree.stringmetric.phonetic.RefinedSoundexAlgorithm
/**
- * The refined Soundex [[org.hashtree.stringmetric.cli.command.Command]]. Returns the phonetic representation of the
+ * The refinedSoundexAlgorithm [[org.hashtree.stringmetric.cli.command.Command]]. Returns the phonetic representation of the
* passed string, per the refined Soundex algorithm.
*/
-object refinedSoundex extends Command {
+object refinedSoundexAlgorithm extends Command {
override def main(args: Array[String]): Unit = {
val options = OptionMapUtility.toOptionMap(args)
@@ -36,7 +36,7 @@ object refinedSoundex extends Command {
println(
"Returns the phonetic representation of the passed string, per the refined Soundex algorithm." + ls + ls +
"Syntax:" + ls +
- tab + "refinedSoundex [Options] string..." + ls + ls +
+ tab + "refinedSoundexAlgorithm [Options] string..." + ls + ls +
"Options:" + ls +
tab + "-h, --help" + ls +
tab + tab + "Outputs description, syntax, and options."
@@ -45,7 +45,7 @@ object refinedSoundex extends Command {
override def execute(options: OptionMap): Unit =
println(
- RefinedSoundex.compute(
+ RefinedSoundexAlgorithm.compute(
options('dashless)
)(new StringFilterDelegate).getOrElse("not computable").toString
)
diff --git a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/soundex.scala b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/soundexAlgorithm.scala
index 0a2ed0b..ba64498 100755
--- a/cli/source/core/scala/org/hashtree/stringmetric/cli/command/soundex.scala
+++ b/cli/source/core/scala/org/hashtree/stringmetric/cli/command/soundexAlgorithm.scala
@@ -3,13 +3,13 @@ package org.hashtree.stringmetric.cli.command
import org.hashtree.stringmetric.StringFilterDelegate
import org.hashtree.stringmetric.cli._
import org.hashtree.stringmetric.cli.command._
-import org.hashtree.stringmetric.phonetic.Soundex
+import org.hashtree.stringmetric.phonetic.SoundexAlgorithm
/**
- * The Soundex [[org.hashtree.stringmetric.cli.command.Command]]. Returns the phonetic representation of the
+ * The soundexAlgorithm [[org.hashtree.stringmetric.cli.command.Command]]. Returns the phonetic representation of the
* passed string, per the Soundex algorithm.
*/
-object soundex extends Command {
+object soundexAlgorithm extends Command {
override def main(args: Array[String]): Unit = {
val options = OptionMapUtility.toOptionMap(args)
@@ -36,7 +36,7 @@ object soundex extends Command {
println(
"Returns the phonetic representation of the passed string, per the Soundex algorithm." + ls + ls +
"Syntax:" + ls +
- tab + "soundex [Options] string..." + ls + ls +
+ tab + "soundexAlgorithm [Options] string..." + ls + ls +
"Options:" + ls +
tab + "-h, --help" + ls +
tab + tab + "Outputs description, syntax, and options."
@@ -45,7 +45,7 @@ object soundex extends Command {
override def execute(options: OptionMap): Unit =
println(
- Soundex.compute(
+ SoundexAlgorithm.compute(
options('dashless)
)(new StringFilterDelegate).getOrElse("not computable").toString
)
diff --git a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/metaphoneSpec.scala b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/metaphoneAlgorithmSpec.scala
index 38b07fb..5de40e4 100755
--- a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/metaphoneSpec.scala
+++ b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/metaphoneAlgorithmSpec.scala
@@ -5,22 +5,22 @@ import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
-final class metaphoneSpec extends ScalaTest {
- "metaphone" should provide {
+final class metaphoneAlgorithmSpec extends ScalaTest {
+ "metaphoneAlgorithm" should provide {
"main method" when passed {
"valid dashless argument" should executes {
"print phonetic representation" in {
val out = new java.io.ByteArrayOutputStream()
Console.withOut(out)(
- metaphone.main(Array("--unitTest", "--debug", "aBc"))
+ metaphoneAlgorithm.main(Array("--unitTest", "--debug", "aBc"))
)
out.toString should equal ("abk\n")
out.reset()
Console.withOut(out)(
- metaphone.main(Array("--unitTest", "--debug", "1"))
+ metaphoneAlgorithm.main(Array("--unitTest", "--debug", "1"))
)
out.toString should equal ("not computable\n")
@@ -30,7 +30,7 @@ final class metaphoneSpec extends ScalaTest {
"no dashless argument" should throws {
"IllegalArgumentException" in {
evaluating {
- metaphone.main(Array("--unitTest", "--debug"))
+ metaphoneAlgorithm.main(Array("--unitTest", "--debug"))
} should produce [IllegalArgumentException]
}
}
diff --git a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/nysiisSpec.scala b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/nysiisAlgorithmSpec.scala
index eddf3da..957a098 100755
--- a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/nysiisSpec.scala
+++ b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/nysiisAlgorithmSpec.scala
@@ -5,22 +5,22 @@ import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
-final class nysiisSpec extends ScalaTest {
- "nysiis" should provide {
+final class nysiisAlgorithmSpec extends ScalaTest {
+ "nysiisAlgorithm" should provide {
"main method" when passed {
"valid dashless argument" should executes {
"print phonetic representation" in {
val out = new java.io.ByteArrayOutputStream()
Console.withOut(out)(
- nysiis.main(Array("--unitTest", "--debug", "aBc"))
+ nysiisAlgorithm.main(Array("--unitTest", "--debug", "aBc"))
)
out.toString should equal ("abc\n")
out.reset()
Console.withOut(out)(
- nysiis.main(Array("--unitTest", "--debug", "1"))
+ nysiisAlgorithm.main(Array("--unitTest", "--debug", "1"))
)
out.toString should equal ("not computable\n")
@@ -30,7 +30,7 @@ final class nysiisSpec extends ScalaTest {
"no dashless argument" should throws {
"IllegalArgumentException" in {
evaluating {
- nysiis.main(Array("--unitTest", "--debug"))
+ nysiisAlgorithm.main(Array("--unitTest", "--debug"))
} should produce [IllegalArgumentException]
}
}
diff --git a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/refinedSoundexSpec.scala b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/refinedSoundexAlgorithmSpec.scala
index ae338d1..d8c9ce6 100755
--- a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/refinedSoundexSpec.scala
+++ b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/refinedSoundexAlgorithmSpec.scala
@@ -5,22 +5,22 @@ import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
-final class refinedSoundexSpec extends ScalaTest {
- "refinedSoundex" should provide {
+final class refinedSoundexAlgorithmSpec extends ScalaTest {
+ "refinedSoundexAlgorithm" should provide {
"main method" when passed {
"valid dashless argument" should executes {
"print phonetic representation" in {
val out = new java.io.ByteArrayOutputStream()
Console.withOut(out)(
- refinedSoundex.main(Array("--unitTest", "--debug", "aBc"))
+ refinedSoundexAlgorithm.main(Array("--unitTest", "--debug", "aBc"))
)
out.toString should equal ("a013\n")
out.reset()
Console.withOut(out)(
- refinedSoundex.main(Array("--unitTest", "--debug", "1"))
+ refinedSoundexAlgorithm.main(Array("--unitTest", "--debug", "1"))
)
out.toString should equal ("not computable\n")
@@ -30,7 +30,7 @@ final class refinedSoundexSpec extends ScalaTest {
"no dashless argument" should throws {
"IllegalArgumentException" in {
evaluating {
- refinedSoundex.main(Array("--unitTest", "--debug"))
+ refinedSoundexAlgorithm.main(Array("--unitTest", "--debug"))
} should produce [IllegalArgumentException]
}
}
diff --git a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/soundexSpec.scala b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/soundexAlgorithmSpec.scala
index c25191a..05ba8ae 100755
--- a/cli/source/test/scala/org/hashtree/stringmetric/cli/command/soundexSpec.scala
+++ b/cli/source/test/scala/org/hashtree/stringmetric/cli/command/soundexAlgorithmSpec.scala
@@ -5,22 +5,22 @@ import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
-final class soundexSpec extends ScalaTest {
- "soundex" should provide {
+final class soundexAlgorithmSpec extends ScalaTest {
+ "soundexAlgorithm" should provide {
"main method" when passed {
"valid dashless argument" should executes {
"print phonetic representation" in {
val out = new java.io.ByteArrayOutputStream()
Console.withOut(out)(
- soundex.main(Array("--unitTest", "--debug", "aBc"))
+ soundexAlgorithm.main(Array("--unitTest", "--debug", "aBc"))
)
out.toString should equal ("a120\n")
out.reset()
Console.withOut(out)(
- soundex.main(Array("--unitTest", "--debug", "1"))
+ soundexAlgorithm.main(Array("--unitTest", "--debug", "1"))
)
out.toString should equal ("not computable\n")
@@ -30,7 +30,7 @@ final class soundexSpec extends ScalaTest {
"no dashless argument" should throws {
"IllegalArgumentException" in {
evaluating {
- soundex.main(Array("--unitTest", "--debug"))
+ soundexAlgorithm.main(Array("--unitTest", "--debug"))
} should produce [IllegalArgumentException]
}
}