Agglutinative language toolkit with logical symbols, translator, and font generator.
Project description
Agglutinative Language Toolkit
This project bootstraps a synthetic agglutinative language with:
- A GPT-powered dictionary generator and translator (
g4fAPI) - A logical symbol system where glyph form encodes meaning + sound
- A font generator that compiles symbols into a
.ttffont
1) Setup
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
pip install -e .
After editable install, you can use:
logiglyph ...(console command)python -m logiglyph ...from logiglyph import LanguageModule
2) Generate dictionary
python -m src.tool generate-dictionary --count 96 --out data/dictionary.json
This calls g4f (gpt-5-mini) and enriches each root with:
semantic_classonset,vowel,coda(sound parts)symbol_id(logical glyph key)symbol(ASCII token:lg_<class>_<root>)char(optional Private Use Area glyph)
If API output is malformed/unavailable, the tool falls back to deterministic local roots.
3) Build font
python -m src.tool build-font --dict data/dictionary.json --out dist/LogiGlyph.ttf
This creates:
dist/LogiGlyph.ttfdist/glyph_map.json
4) Translate text
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
--reverse expects ASCII symbols (lg_<class>_<root>), not PUA glyph characters.
5) Build specimen (visual check)
python -m src.tool build-specimen --dict data/dictionary.json --font dist/LogiGlyph.ttf --out dist/specimen.html
Open dist/specimen.html in a browser. Keep LogiGlyph.ttf in the same folder so @font-face can load it.
Font rendering troubleshooting
Default translation output is ASCII (lg_<class>_<root>) and renders in any font.
The optional visual glyph mode uses Private Use Area (U+E100+) and needs LogiGlyph.ttf.
- Terminal/editor showing squares only affects PUA glyphs; ASCII symbols are always safe.
- Browser: use CSS
@font-faceand setfont-family: 'LogiGlyph'only when rendering PUA glyph text. - Windows app: install
dist/LogiGlyph.ttfonly if you choose PUA glyph rendering.
Example VS Code setting:
{
"editor.fontFamily": "LogiGlyph, Consolas, 'Courier New', monospace"
}
Use as a Python module
from logiglyph import LanguageModule
lang = LanguageModule("data/dictionary.json")
res = lang.translate("person_0 house_1 water_2")
print(res.text) # e.g. lg_e_pa_ lg_e_pan lg_e_pak
print(res.codepoints) # ['U+E100', 'U+E101', 'U+E102']
print(lang.reverse(res.text)) # person_0 house_1 water_2
print(lang.install_note())
Logical symbol design
Each glyph is compositional and fully rule-driven:
- Semantic radical (base shape):
entity: boxaction: diagonal crossquality: diamondrelation: bridge barabstract: circle-ish octagon
- Onset class adds a stem direction.
- Vowel places a dot mark in one of 5 anchor positions.
- Coda adds a terminal notch/tick style.
So related meanings and sounds share visible structure.
Direct g4f usage
The dictionary generator internally uses this same API pattern:
from g4f.client import Client
client = Client()
response = client.chat.completions.create(
model="gpt-5-mini",
messages=[{"role": "user", "content": "..." }],
web_search=False
)
print(response.choices[0].message.content)
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
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.1.tar.gz.
File metadata
- Download URL: logiglyph-0.1.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7350e61bb6cc0495c24d7b8f28448cc0fec7e92f1d47324b3f21669e3f5438a2
|
|
| MD5 |
4612f34fc3f79bcafe1abd6e0c79f9fc
|
|
| BLAKE2b-256 |
f9053c7a6e337d066effd0c21dceb511bff268f9c7abf2892df146debcadf76e
|
File details
Details for the file logiglyph-0.1.1-py3-none-any.whl.
File metadata
- Download URL: logiglyph-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.7 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 |
7679bade63892666373ba50d83b00b3c48386cbc09d10a9b88de01777b8948f8
|
|
| MD5 |
48dd8cbdfb45c22cadca27e074ce7b44
|
|
| BLAKE2b-256 |
15d4b69f3240c0fb8e5061801da708eb03938e3f6a2ac0889dfb26c35170efca
|