Class CommandLineInterface
java.lang.Object
com.optimaize.langdetect.cybozu.CommandLineInterface
LangDetect Command Line Interface.
This is a command line interface of Language Detection Library "LangDetect".
Renamed: this class was previously known as "Command".
TODO after my recent changes switching to the new Detector this code is untested. -Fabian
- Author:
- Nakatani Shuyo, Francois ROLAND, Fabian Kessler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBatch Test of Language Detection (--batchtest option)voidLanguage detection test for each file (--detectlang option)voidGenerate Language Profile from a text file.static voidCommand Line Interface
-
Constructor Details
-
CommandLineInterface
public CommandLineInterface()
-
-
Method Details
-
main
Command Line Interface- Parameters:
args- command line arguments- Throws:
IOException
-
generateProfile
public void generateProfile()Generate Language Profile from a text file.usage: --genprofile [text file] [language name]
-
detectLang
Language detection test for each file (--detectlang option)usage: --detectlang -d [profile directory] -a [alpha] -s [seed] [test file(s)]
- Throws:
IOException
-
batchTest
Batch Test of Language Detection (--batchtest option)usage: --batchtest -d [profile directory] -a [alpha] -s [seed] [test data(s)]
The format of test data(s):[correct language name]\t[text body for test]\n
- Throws:
IOException
-