com.cybozu.labs.langdetect
Class GenProfile

java.lang.Object
  extended by 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

Constructor Summary
GenProfile()
           
 
Method Summary
static LangProfile loadFromText(String lang, File file)
          Load text file with UTF-8 and generate its language profile
static LangProfile loadFromWikipediaAbstract(String lang, File file)
          Load Wikipedia abstract database file and generate its language profile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenProfile

public GenProfile()
Method Detail

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 name
file - 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 name
file - target file path
Returns:
Language profile instance
Throws:
LangDetectException


Copyright © 2012. All Rights Reserved.