Radixor data formats
This page defines the persistence and interoperability boundary between editable lexical evidence and the compact runtime artifact. It covers the compiled version 7 stream and the runtime support matrix; the complete source row grammar belongs to Dictionary Format, and public model artifact ownership belongs to Stemmer Models.
Format overview
| Form | Typical suffix | Purpose | Java | Python (PyO3) | Python-C |
|---|---|---|---|---|---|
| Text dictionary | .tsv, .txt, optionally .gz |
Human-editable training data: stem followed by known forms | Read and compile | Read and compile | Not supported |
| Compiled Radixor trie v7 | .rxc or .radixor.gz |
GZip-framed, self-describing runtime trie | Read and write | Read and write | Read |
| Standard model package | model JAR or radixor-models-standard wheel |
Published collection of prepared models and metadata | Model JARs | Shared Python data wheel | Same shared Python data wheel |
Suffixes communicate intent; detection depends on the content. .rxc is the
usual Python name, while Java examples commonly use .radixor.gz. Both contain
the same GZip-compressed version 7 Radixor stream.
Text dictionary
Each UTF-8 line begins with a canonical stem. Further fields are observed word
forms, separated by tab characters. The examples in this documentation use the
visible symbol ⇥ to represent one actual tab character:
run ⇥ running ⇥ runs ⇥ ran
city ⇥ cities
⇥ is a documentation symbol only; it must not be written to the dictionary.
Likewise, do not type the two characters \t. In the real file, press the Tab
key or configure the producing tool to emit a tab character (Unicode U+0009)
between fields.
This is source data, not a runtime lookup table. Radixor derives transformation commands from the relationships and can apply learned commands beyond the listed forms. See the Dictionary Format for parsing, comments, normalization and validation rules.
Create a compiled trie from text with one of these preparation tools:
- Java API or the Java CLI, for the complete compilation controls;
radixor.compile(...), documented under Python model compilation.
Python-C deliberately does not compile text dictionaries. Compile once with
Java or radixor, then deploy the resulting binary to radixor-c.
Compiled version 7 trie
“Version 7” identifies the serialization schema of a compiled Radixor model. It
is not the Radixor library version, the model release, or the language-catalog
version. A v7 stream begins with the EGTR format marker and a schema version,
then stores the trie, patch commands, and the metadata required to interpret
them consistently in another runtime.
The binary contains the reduced trie, patch commands and build metadata needed for lookup, including traversal direction and normalization settings. It is the preferred production artifact because application startup does not repeat text parsing, command generation or trie reduction.
The decompressed v7 stream is interoperable:
flowchart TB
accTitle: Version 7 compiled model interoperability
accDescr: A text dictionary can be compiled by Java or Python PyO3 into a version 7 trie. The persisted trie can be loaded by Java, Python PyO3, or Python-C. The common boundary is the file format, not an in-memory object layout.
DICTIONARY["Text dictionary<br/>.tsv, .txt, or .gz"] --> COMPILERS["Supported compilers<br/>Java API or CLI<br/>Python (PyO3) compile()"]
COMPILERS --> V7["Compiled version 7 trie<br/>.rxc or .radixor.gz"]
V7 --> RUNTIMES["Supported loaders<br/>Java runtime<br/>Python (PyO3) runtime<br/>Python-C runtime"]
RUNTIMES --> BOUNDARY["Shared persisted format<br/>distinct in-memory layouts"]
The interoperability path is file-based: Java or Python (PyO3) compiles a text dictionary into a version 7 artifact, and Java, Python (PyO3), or Python-C loads that artifact. The runtimes do not share an in-memory object layout.
The outer GZip bytes may differ between compressors without changing the model. Only v7 is promised across the Python runtimes; Java also owns migration and compatibility facilities for older project formats.
Extending a model
There are two distinct workflows:
- Add rows to a text dictionary and compile a new artifact. Java and
radixorsupport this route. - Reopen an existing compiled trie, add transformations and rebuild it. This is currently a Java capability; see Extending and Persisting Compiled Tries.
The rebuilt v7 artifact can then be consumed by all three runtimes, including Python-C. Treat source dictionaries and compiled tries as versioned application assets and regression-test domain vocabulary before deployment.