Pure-python reader for DAWGs (Directed Acyclic Word Graphs / Deterministic Acyclic Finite State Automata). It's designed to load and query existing DAWG files, often created by the dawgdic C++ library or the DAWG Python C extension, but can also build small DAWGs from sorted word lists. The current version is 0.7.2, with releases occurring infrequently as needed.
pip install dawg-pythonVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a DAWG (for illustration), save it to a file, and then load and query it. It also shows basic usage of `IntDAWG` for words with associated integer payloads. The core use case is loading and querying, with file creation typically handled by other, more performant tools for large datasets.
For large-scale DAWG construction, consider using `dawgdic` or its Python C extension bindings, and then loading the resulting `.dawg` files with `dawg-python`.
To modify a DAWG, you must build a new DAWG object from the desired set of words and payloads.
Pre-sort your list of words/tuples before passing them to the DAWG constructor: `DAWG(sorted(my_words_list))`.
Ensure that all payloads provided to `IntDAWG` are integers.
No dependency data recorded yet.