This class is used to construct a dictionary in the form of a minimized deterministic finite state automaton. This builder can create a normal dictionary automaton ( {@link Dictionary} or a perfect hash automaton( {@link PerfectHashDictionary}).
The workflow is simple:
- Create an instance of this class.
- Add character sequences in lexicographic order using {@link DictionaryBuilder#add(CharSequence)}.
- Construct the automaton with {@link DictionaryBuilder#build()} or{@link DictionaryBuilder#buildPerfectHash()}.
Construction of the automaton finalizes the build process - it is not possible to add new character sequences afterwards.
The following construction algorithm is used:
Incremental Construction of Minimal Acyclic Finite-State Automata, Jan Daciuk, Bruce W. Watson, Stoyan Mihov, and Robert E. Watson, 2000, Association for Computational Linguistics
@author Daniel de Kok