Tag Archives: detection

Generate n-gram Language Profile using the Language Detection Library for Java

For creating n-gram data from xml-formatted Wikipedia abstract files to be used with the language-detection library for Java/Processing:
  • At the same folder as the downloaded file, create a folder called profiles.
  • In Terminal, cd into that folder.
  • Run the following line by replacing the last argument with the language code of your downloaded file (here tr is used for Turkish):

java -jar /[PathToLangDetectFile]/langdetect.jar --genprofile -d ./ tr

More information: http://code.google.com/p/language-detection/wiki/Tools

Language codes: http://code.google.com/p/language-detection/wiki/LanguageList