summaryrefslogtreecommitdiff
path: root/cli/src/main/scala/com/rockymadden/stringmetric/cli/phonetic/refinedsoundexalgorithm.scala
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/main/scala/com/rockymadden/stringmetric/cli/phonetic/refinedsoundexalgorithm.scala')
-rwxr-xr-xcli/src/main/scala/com/rockymadden/stringmetric/cli/phonetic/refinedsoundexalgorithm.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/src/main/scala/com/rockymadden/stringmetric/cli/phonetic/refinedsoundexalgorithm.scala b/cli/src/main/scala/com/rockymadden/stringmetric/cli/phonetic/refinedsoundexalgorithm.scala
new file mode 100755
index 0000000..12ac8e0
--- /dev/null
+++ b/cli/src/main/scala/com/rockymadden/stringmetric/cli/phonetic/refinedsoundexalgorithm.scala
@@ -0,0 +1,16 @@
+package com.rockymadden.stringmetric.cli.phonetic
+
+import com.rockymadden.stringmetric.cli._
+import com.rockymadden.stringmetric.phonetic.RefinedSoundexAlgorithm
+
+case object refinedsoundexalgorithm extends Command(
+ (opts) =>
+ "Returns the phonetic representation of the passed string, per the refined Soundex algorithm." + Ls + Ls +
+ "Syntax:" + Ls +
+ Tab + "refinedsoundexalgorithm [Options] string..." + Ls + Ls +
+ "Options:" + Ls +
+ Tab + "-h, --help" + Ls +
+ Tab + Tab + "Outputs description, syntax, and opts.",
+ (opts) => opts.contains('dashless) && (opts('dashless): Array[String]).length == 1,
+ (opts) => RefinedSoundexAlgorithm.compute(opts('dashless)).getOrElse("not computable")
+)