
sanskritnlp.app.SanskritNlp.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of indic-transliteration Show documentation
Show all versions of indic-transliteration Show documentation
A collection of scala and java classes for some basic character level processing for the Sanskrit and other Indic (kannada, telugu, etc..) languages, contributed by the open source sanskrit-coders projects and friends.
Some notable facilities:
* Transliterate text from one script or encoding scheme to another.
* Some grammar simulation.
Examples: see https://github.com/sanskrit-coders/indic-transliteration
Contributions and suggestions are invited at https://github.com/sanskrit-coders/indic-transliteration . (Sister projects there may also be of interest.)
package sanskritnlp.app
import org.slf4j.LoggerFactory
import sanskritnlp.transliteration._
import sanskritnlp.vyAkaraNa._
object sanskritNlp {
val log = LoggerFactory.getLogger(this.getClass)
// The file whence parameters such as laungage, corpus, taggerType are read.
var RUNTIME_SETTINGS_FILE = getClass.getResource("/default/runtimeSettings.properties").getPath
val props = new java.util.Properties
val file = new java.io.FileInputStream(RUNTIME_SETTINGS_FILE)
props.load(file)
file.close
/**
* @param args the command line arguments:
* args(1), if it exists, is assumed to be RUNTIME_SETTINGS_FILE
*
*/
def main(args: Array[String]): Unit = {
if(args.length < 0) log error "Need an argument."
args(0) match {
case "bot" => {
//new Wiktionary().test
}
case _ => println("No program yet.")
}
}
}
object sanskritNlpTest {
def main(args: Array[String]): Unit = {
shivasUtra.test
vowels.test
kannaDa.test
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy