Class HunspellAffixTable

java.lang.Object
opennlp.tools.stemmer.hunspell.HunspellAffixTable

final class HunspellAffixTable extends Object
Affix tables with entry counts and source locations for validation errors.
  • Constructor Details

    • HunspellAffixTable

      private HunspellAffixTable()
      Prevents construction.
  • Method Details

    • read

      static List<HunspellAffixTable.Entry> read(String[][] lines, String tag, int minimumFields, int maximumFields) throws IOException
      Checks a table header, entry count, and field counts.
      Parameters:
      lines - The tokenized affix content.
      tag - The table directive.
      minimumFields - The minimum fields in an entry, including the directive.
      maximumFields - The maximum fields in an entry, including the directive.
      Returns:
      The entries, or null if the file has no declaration for this table.
      Throws:
      IOException - Thrown if the header, entries, or count is invalid.