Class 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 Detail

      • MorfologikDictionayBuilder

        public MorfologikDictionayBuilder()
    • 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
      • build

        public Path build​(Path input)
                   throws Exception
        Helper to compile a morphological dictionary automaton using default parameters.
        Parameters:
        input - The input file (base,inflected,tag). An associated metadata (*.info) file must exist.
        Returns:
        the dictionary path
        Throws:
        Exception