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 and Description
    `MorfologikDictionayBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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`

Copyright © 2026 The Apache Software Foundation. All rights reserved.