Class CommandLineInterface


  • public class CommandLineInterface
    extends Object
    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 Detail

      • CommandLineInterface

        public CommandLineInterface()
    • Method Detail

      • main

        public static void main​(String[] args)
                         throws IOException
        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

        public void detectLang()
                        throws IOException
        Language detection test for each file (--detectlang option)
         usage: --detectlang -d [profile directory] -a [alpha] -s [seed] [test file(s)]
         
        Throws:
        IOException
      • batchTest

        public void batchTest()
                       throws IOException
        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