Skip to main content

Agglutinative language toolkit with logical ASCII symbols and translator.

Project description

Agglutinative Language Toolkit

This project builds a small synthetic language and translates between:

  • Normal English text (example: the person builds a house)
  • 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

The translator maps natural words through aliases in the dictionary, drops articles (a, an, the), and applies light lemmatization for common forms (-s, -es, -ed, -ing).

Build Concept + Grammar References

python -m src.tool build-language-pack --dict data/dictionary.json --concepts-out data/concepts.json --grammar-out data/grammar_reference.json

This writes:

  • data/concepts.json (concept inventory, symbols, aliases, semantic classes)
  • data/grammar_reference.json (translation conventions and symbol format)

Dictionary Schema

Each entry in data/dictionary.json has:

  • root: phonological root (pa, pan, ...)
  • gloss: stable internal key (person_0, house_1, ...)
  • semantic_class: one of entity|action|quality|relation|abstract
  • onset, vowel, coda: compositional sound parts
  • symbol_id: structured id (entity:p:a:_)
  • symbol: deterministic ASCII symbol (lg_<class>_<root>)
  • aliases: natural-language lookup words (example: ["person", "human", "people"])

Python API

from logiglyph import LanguageModule

lang = LanguageModule("data/dictionary.json")
res = lang.translate("the person builds a house near water")
print(res.text)               # e.g. lg_e_pa_ lg_a_pi_ lg_e_pan lg_r_pon lg_e_pak
print(lang.reverse(res.text)) # person make house near water

Project details


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.3.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logiglyph-0.1.3-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file logiglyph-0.1.3.tar.gz.

File metadata

  • Download URL: logiglyph-0.1.3.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for logiglyph-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4a89e98fd48daa8a3c6d688f6c8872a3939c39c70db930f990fbe07cbc2aeffa
MD5 a34e1e07eb0bcca0288e65508ed06171
BLAKE2b-256 75f7db9862b2e935a455639010e073b503cb12accf1035644847e0a8d44d8ab4

See more details on using hashes here.

File details

Details for the file logiglyph-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: logiglyph-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for logiglyph-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fc85fafe0ddb2c14e93a7f53022b92acf28e8c015b70aabd7f460902a7555279
MD5 c82d6ed3b09dc0d2117db2ec5f6fb721
BLAKE2b-256 5f3c9c47687f2e818f5d64760c0561086c9e8c43c93af33d7a26593615aab6c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page