com.cybozu.labs.langdetect
Class GenProfile
java.lang.Object
com.cybozu.labs.langdetect.GenProfile
public class GenProfile
- extends Object
Load Wikipedia's abstract XML as corpus and
generate its language profile in JSON format.
- Author:
- Nakatani Shuyo
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenProfile
public GenProfile()
loadFromWikipediaAbstract
public static LangProfile loadFromWikipediaAbstract(String lang,
File file)
throws LangDetectException
- Load Wikipedia abstract database file and generate its language profile
- Parameters:
lang - target language namefile - target database file path
- Returns:
- Language profile instance
- Throws:
LangDetectException
loadFromText
public static LangProfile loadFromText(String lang,
File file)
throws LangDetectException
- Load text file with UTF-8 and generate its language profile
- Parameters:
lang - target language namefile - target file path
- Returns:
- Language profile instance
- Throws:
LangDetectException
Copyright © 2012. All Rights Reserved.