All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.halfmatthalfcat.stringmetric.cli.phonetic.nysiisalgorithm.scala Maven / Gradle / Ivy

The newest version!
package com.github.halfmatthalfcat.stringmetric.cli.phonetic

import com.github.halfmatthalfcat.stringmetric.cli._
import com.github.halfmatthalfcat.stringmetric.phonetic.NysiisAlgorithm

case object nysiisalgorithm extends Command(
	(opts) =>
		"Returns the phonetic representation of the passed string, per the NYSIIS algorithm." + Ls + Ls +
		"Syntax:" + Ls +
		Tab + "nysiisalgorithm [Options] string..." + Ls + Ls +
		"Options:" + Ls +
		Tab + "-h, --help" + Ls +
		Tab + Tab + "Outputs description, syntax, and options.",
	(opts) => opts.contains('dashless) && (opts('dashless): Array[String]).length == 1,
	(opts) => NysiisAlgorithm.compute(opts('dashless)).getOrElse("not computable")
) { override def main(args: Array[String]): Unit = super.main(args) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy