com.rockymadden.stringmetric.cli.phonetic.metaphonealgorithm.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stringmetric-cli Show documentation
Show all versions of stringmetric-cli Show documentation
String metrics and phonetic algorithms for Scala.
The newest version!
package com.rockymadden.stringmetric.cli.phonetic
import com.rockymadden.stringmetric.cli._
import com.rockymadden.stringmetric.phonetic.MetaphoneAlgorithm
case object metaphonealgorithm extends Command(
(opts) =>
"Returns the phonetic representation of the passed string, per the Metaphone algorithm." + Ls + Ls +
"Syntax:" + Ls +
Tab + "metaphonealgorithm [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) => MetaphoneAlgorithm.compute(opts('dashless)).getOrElse("not computable")
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy