Package com.optimaize.langdetect.frma
Class GenProfile
- java.lang.Object
-
- com.optimaize.langdetect.frma.GenProfile
-
public class GenProfile extends java.lang.Object
Generate a language profile from any given text file. TODO this is copy/paste from the other class with the same name. Check if code can be re-used. Rename to something meaningful.
-
-
Field Summary
Fields Modifier and Type Field Description private static TextObjectFactory
textObjectFactory
-
Constructor Summary
Constructors Constructor Description GenProfile()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LangProfile
generate(java.lang.String lang, java.io.File textFile)
Loads a text file and generate a language profile from its content.
-
-
-
Field Detail
-
textObjectFactory
private static final TextObjectFactory textObjectFactory
-
-
Method Detail
-
generate
public static LangProfile generate(java.lang.String lang, java.io.File textFile)
Loads a text file and generate a language profile from its content. The input text file is supposed to be encoded in UTF-8.- Parameters:
lang
- target language name.textFile
- input text file.- Returns:
- Language profile instance
-
-