For creating n-gram data from xml-formatted Wikipedia abstract files to be used with the language-detection library for Java/Processing:
- Download a Wikipedia abstract database file of the language of interest, e.g http://dumps.wikimedia.org/trwiki/latest/trwiki-latest-abstract.xml for Turkish
- 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