Class StemmerPatchTrieLoader

java.lang.Object
org.egothor.stemmer.StemmerPatchTrieLoader

public final class StemmerPatchTrieLoader extends Object
Loader of patch-command tries from bundled stemmer dictionaries.

Each dictionary is line-oriented and uses a tab-separated values layout. The first column on a line is interpreted as the stem, and all following tab-separated columns are treated as known variants of that stem.

For each line, the loader inserts:

  • the stem itself mapped to the canonical no-op patch command PatchCommandEncoder.NOOP_PATCH, when requested by the caller
  • every distinct variant mapped to the patch command transforming that variant to the stem using the traversal direction implied by the selected language or loader overload

Parsing is delegated to StemmerDictionaryParser, which also supports line remarks introduced by # or // and ignores dictionary items containing Unicode whitespace characters while reporting them through aggregated warning log records.