public class CommandLineInterface extends Object
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
Constructor and Description |
---|
CommandLineInterface() |
Modifier and Type | Method and Description |
---|---|
void |
batchTest()
Batch Test of Language Detection (--batchtest option)
|
void |
detectLang()
Language detection test for each file (--detectlang option)
|
void |
generateProfile()
Generate Language Profile from a text file.
|
static void |
main(String[] args)
Command Line Interface
|
public static void main(String[] args) throws IOException
args
- command line argumentsIOException
public void generateProfile()
usage: --genprofile [text file] [language name]
public void detectLang() throws IOException
usage: --detectlang -d [profile directory] -a [alpha] -s [seed] [test file(s)]
IOException
public void batchTest() throws IOException
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
IOException
Copyright © 2018. All rights reserved.