Agglutinative language toolkit with logical ASCII symbols and translator.
Project description
Agglutinative Language Toolkit
This project builds a small synthetic language and translates between:
- English gloss tokens (example:
person_0) - ASCII language symbols (example:
lg_e_pa_)
Setup
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
pip install -e .
Generate Dictionary
python -m src.tool generate-dictionary --count 96 --out data/dictionary.json
Translate
python -m src.tool translate --dict data/dictionary.json --text "the person builds a house"
python -m src.tool translate --dict data/dictionary.json --text "lg_e_pa_ lg_e_pan lg_e_pak" --reverse
Dictionary Schema
Each entry in data/dictionary.json has:
root: phonological root (pa,pan, ...)gloss: English key used by translator (person_0,house_1, ...)semantic_class: one ofentity|action|quality|relation|abstractonset,vowel,coda: compositional sound partssymbol_id: structured id (entity:p:a:_)symbol: deterministic ASCII symbol (lg_<class>_<root>)
Python API
from logiglyph import LanguageModule
lang = LanguageModule("data/dictionary.json")
res = lang.translate("person_0 house_1 water_2")
print(res.text) # lg_e_pa_ lg_e_pan lg_e_pak
print(lang.reverse(res.text)) # person_0 house_1 water_2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
logiglyph-0.1.2.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logiglyph-0.1.2.tar.gz.
File metadata
- Download URL: logiglyph-0.1.2.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf8207cfac9cf4e09b03bd0b5140067b9a7e5ae58a32d746f9fdcd0ae73771ea
|
|
| MD5 |
6e13b67eac73e2222a6f179655d14daa
|
|
| BLAKE2b-256 |
85419943de5e8f03eea78483259cf2623ac35dc3d96670f0b69d0e836e0bfa3d
|
File details
Details for the file logiglyph-0.1.2-py3-none-any.whl.
File metadata
- Download URL: logiglyph-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0d746f4abe44ae37e1e6a1def9e9baf69bfcde66e2da4df31a1aef3f662eee0
|
|
| MD5 |
a694586f18d1c36331758a78584db63f
|
|
| BLAKE2b-256 |
0d69eb7f0d6c252afa2921b07cb0326a69666beff5bf704cc8e1578be25a28c2
|