Package opennlp.morfologik.builder
Class MorfologikDictionayBuilder
- java.lang.Object
-
- opennlp.morfologik.builder.MorfologikDictionayBuilder
-
public class MorfologikDictionayBuilder extends Object
Utility class to build Morfologik dictionaries from a tab separated values file. The first column is the word, the second its lemma and the third a POS tag. If there is no lemma information leave the second column empty.
-
-
Constructor Summary
Constructors Constructor Description MorfologikDictionayBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
build(Path input)
Helper to compile a morphological dictionary automaton using default parameters.Path
build(Path input, boolean overwrite, boolean validate, boolean acceptBom, boolean acceptCr, boolean ignoreEmpty)
Helper to compile a morphological dictionary automaton.
-
-
-
Method Detail
-
build
public Path build(Path input, boolean overwrite, boolean validate, boolean acceptBom, boolean acceptCr, boolean ignoreEmpty) throws Exception
Helper to compile a morphological dictionary automaton.- Parameters:
input
- The input file (base,inflected,tag). An associated metadata (*.info) file must exist.overwrite
- Overwrite the output file if it exists.validate
- Validate input to make sure it makes sense.acceptBom
- Accept leading BOM bytes (UTF-8).acceptCr
- Accept CR bytes in input sequences (\r).ignoreEmpty
- Ignore empty lines in the input.- Returns:
- the dictionary path
- Throws:
Exception
-
-