denela-api / data /grammar.json
DenizGogus's picture
Add directional routing and semantic reranking
cbd6d0b verified
Raw
History Blame Contribute Delete
10.8 kB
{
"name": "Denela",
"version": "0.2.0",
"design_goal": "A human-learnable independent machine-born language with rule-governed phonology, syntax, morphology, and lexicon growth.",
"orthography": {
"terminal_punctuation": [".", "?", "!"],
"clause_punctuation": [","],
"rules": [
"Use punctuation as a reading aid only; particles carry grammar.",
"End statements with a period.",
"End direct questions with a question mark, usually alongside the question particle ma.",
"Use exclamation marks only for strong emotion or command-like emphasis.",
"Use commas sparingly for readability around longer clauses."
]
},
"phonology": {
"vowels": ["a", "e", "i", "o", "u"],
"consonants": ["b", "d", "f", "g", "h", "k", "l", "m", "n", "p", "r", "s", "t", "v", "y", "z"],
"allowed_syllable_patterns": ["V", "CV", "VC", "CVC"],
"max_syllables": 3,
"stress": "Prefer penultimate stress for words with two or more syllables.",
"notes": [
"All Denela forms are lowercase ASCII.",
"Avoid consonant clusters.",
"Avoid forms that differ by only one final vowel when meanings are unrelated."
]
},
"syntax": {
"default_order": "subject tense_or_mode verb object modifiers",
"mode_order": "subject mode negation verb object modifiers",
"subordinate_order": "main_clause marker subordinate_clause",
"question_order": "declarative_clause ma",
"negation_order": "subject tense_or_mode ne verb object modifiers",
"noun_phrase_order": "modifier noun",
"possessive_order": "possessor en possessed",
"relative_clause_order": "noun re clause",
"coordination_order": "unit ko unit",
"comitative_order": "predicate arguments ke companion"
},
"morphology": {
"plural_suffix": "-ai",
"agent_suffix": "-en",
"place_suffix": "-or",
"abstract_suffix": "-um",
"adjective_suffix": "-el",
"verb_suffix": "-a",
"notes": [
"Roots are reusable. Do not create a new root if a transparent derivation exists.",
"Use suffixes only when they improve learnability; high-frequency words may be lexicalized."
]
},
"closed_class": [
{
"form": "ka",
"pos": "pronoun",
"meaning_en": "I; me",
"meaning_tr": "ben; beni; bana",
"role": "first person singular"
},
{
"form": "tu",
"pos": "pronoun",
"meaning_en": "you",
"meaning_tr": "sen; seni; sana",
"role": "second person"
},
{
"form": "an",
"pos": "pronoun",
"meaning_en": "he; she; they; person",
"meaning_tr": "o; onlar; kisi",
"role": "third person neutral"
},
{
"form": "mi",
"pos": "pronoun",
"meaning_en": "we; us",
"meaning_tr": "biz; bizi; bize",
"role": "first person plural"
},
{
"form": "li",
"pos": "pronoun",
"meaning_en": "it; that thing",
"meaning_tr": "o sey; onu",
"role": "inanimate pronoun"
},
{
"form": "na",
"pos": "particle",
"meaning_en": "present; general time",
"meaning_tr": "simdiki/genis zaman",
"role": "present tense"
},
{
"form": "pa",
"pos": "particle",
"meaning_en": "past",
"meaning_tr": "gecmis zaman",
"role": "past tense"
},
{
"form": "fu",
"pos": "particle",
"meaning_en": "future",
"meaning_tr": "gelecek zaman",
"role": "future tense"
},
{
"form": "ne",
"pos": "particle",
"meaning_en": "not",
"meaning_tr": "degil; -me/-ma",
"role": "negation"
},
{
"form": "ma",
"pos": "particle",
"meaning_en": "question marker",
"meaning_tr": "soru eki",
"role": "yes/no question"
},
{
"form": "ven",
"pos": "connector",
"meaning_en": "when",
"meaning_tr": "ne zaman; -inca",
"role": "time clause"
},
{
"form": "si",
"pos": "connector",
"meaning_en": "if",
"meaning_tr": "eger",
"role": "condition clause"
},
{
"form": "por",
"pos": "connector",
"meaning_en": "because",
"meaning_tr": "cunku",
"role": "reason clause"
},
{
"form": "re",
"pos": "connector",
"meaning_en": "that; which; who",
"meaning_tr": "ki; olan",
"role": "relative clause"
},
{
"form": "en",
"pos": "connector",
"meaning_en": "of; belonging to",
"meaning_tr": "-in; -nin",
"role": "possession"
},
{
"form": "ko",
"pos": "connector",
"meaning_en": "and",
"meaning_tr": "ve",
"role": "coordination"
},
{
"form": "ke",
"pos": "particle",
"meaning_en": "with; together with",
"meaning_tr": "ile; birlikte",
"role": "comitative relation"
},
{
"form": "su",
"pos": "particle",
"meaning_en": "should; ought to",
"meaning_tr": "-meli; -malı",
"role": "advisability; weak obligation"
},
{
"form": "mu",
"pos": "particle",
"meaning_en": "must; have to",
"meaning_tr": "zorunda; mutlaka",
"role": "necessity; strong obligation"
},
{
"form": "vo",
"pos": "connector",
"meaning_en": "or",
"meaning_tr": "veya",
"role": "alternative"
}
],
"semantic_alignment": {
"notes": [
"ko coordinates equal units and never means with.",
"ke marks a companion participating in an event; attributive and instrumental uses of English with require their own Denela structures.",
"su expresses advice or weak obligation and must not be replaced by future fu.",
"mu expresses strong necessity and must not be replaced by future fu."
],
"features": [
{
"id": "coordination",
"marker": "ko",
"english_patterns": ["\\band\\b"],
"turkish_patterns": ["\\bve\\b"],
"missing_message": "Coordination in the source requires ko; ke cannot replace and."
},
{
"id": "comitative",
"marker": "ke",
"english_patterns": [
"\\bwith\\s+(?:me|you|him|her|us|them)\\b",
"\\bwith\\s+(?:(?:my|your|his|her|our|their|a|the)\\s+)?(?:friend|friends|family|parent|parents|mother|father|brother|sister|child|children|person|people|team)\\b"
],
"turkish_patterns": [
"\\b(?:benimle|seninle|onunla|onunla|bizimle|sizinle|onlarla)\\b",
"\\barkada(?:ş|s)(?:ım|ın|ı|ımız|ınız|ları)?(?:la|le)\\b"
],
"missing_message": "A companion in the source requires ke; ko means and, not with."
},
{
"id": "advisability",
"marker": "su",
"english_patterns": ["\\bshould\\b", "\\bought\\s+to\\b"],
"turkish_patterns": ["\\b\\w+(?:malı|meli)(?:yım|yim|yız|yiz|sın|sin|sınız|siniz)?\\b"],
"missing_message": "Advice or weak obligation requires su; fu expresses future only."
},
{
"id": "necessity",
"marker": "mu",
"english_patterns": ["\\bmust\\b", "\\b(?:have|has|had)\\s+to\\b"],
"turkish_patterns": ["\\bzorunda\\b", "\\bzorunday\\w*\\b", "\\bmutlaka\\b"],
"missing_message": "Strong necessity requires mu; fu expresses future only."
},
{
"id": "desire",
"marker": "nevir",
"weight": 6,
"english_patterns": ["\\bwant(?:s|ed|ing)?\\b", "\\bwould\\s+like\\b"],
"turkish_patterns": ["\\b(?:ist|arzul)\\w*\\b"],
"missing_message": "Desire expressed in the source requires nevir."
},
{
"id": "future",
"marker": "fu",
"weight": 8,
"english_patterns": ["\\bwill\\b", "\\bshall\\b", "\\bgoing\\s+to\\b"],
"turkish_patterns": ["\\b\\w+(?:acak|ecek)(?:ım|im|ız|iz|sın|sin|siniz|lar|ler)?\\b"],
"missing_message": "Future time expressed in the source requires fu."
},
{
"id": "negation",
"marker": "ne",
"weight": 8,
"english_patterns": ["\\b(?:not|never|cannot|can't|don't|doesn't|didn't|won't|isn't|aren't|wasn't|weren't)\\b"],
"turkish_patterns": ["\\b(?:değil|yok|asla)\\b", "\\b\\w+(?:mıyor|miyor|muyor|müyor|madı|medi|mayacak|meyecek)\\w*\\b"],
"missing_message": "Negation expressed in the source requires ne."
},
{
"id": "question",
"marker": "ma",
"weight": 8,
"english_patterns": ["^\\s*(?:do|does|did|is|are|am|was|were|will|would|can|could|should|has|have|had)\\b"],
"turkish_patterns": ["\\b(?:mi|mı|mu|mü)\\b", "\\b\\w+(?:mısın|misin|musun|müsün|mıyım|miyim|muyum|müyüm)\\b"],
"missing_message": "A direct yes/no question requires the Denela question marker ma."
},
{
"id": "condition",
"marker": "si",
"weight": 8,
"english_patterns": ["\\bif\\b"],
"turkish_patterns": ["\\beğer\\b", "\\beger\\b"],
"missing_message": "A condition in the source requires si."
},
{
"id": "reason",
"marker": "por",
"weight": 8,
"english_patterns": ["\\bbecause\\b"],
"turkish_patterns": ["\\bçünkü\\b", "\\bcunku\\b"],
"missing_message": "A stated reason in the source requires por."
},
{
"id": "alternative",
"marker": "vo",
"weight": 8,
"english_patterns": ["\\bor\\b"],
"turkish_patterns": ["\\b(?:veya|ya da)\\b"],
"missing_message": "An alternative in the source requires vo."
},
{
"id": "possession",
"marker": "en",
"weight": 5,
"english_patterns": ["\\b\\w+'s\\b", "\\b(?:my|your|his|her|our|their)\\b"],
"turkish_patterns": [],
"missing_message": "An explicit possessor in the source requires en."
},
{
"id": "tonight",
"marker": "naku",
"weight": 4,
"english_patterns": ["\\btonight\\b"],
"turkish_patterns": ["\\bbu\\s+gece\\b"],
"missing_message": "Tonight requires the Denela night-time marker naku."
}
]
},
"translation_policy": [
"Prefer existing lexicon entries before proposing a new root.",
"If a concept is missing, propose one pronounceable Denela root with a short rationale.",
"Do not output random IDs, punctuation-heavy forms, or unpronounceable clusters.",
"Keep Denela word order transparent even when English or Turkish idiom differs.",
"When an idiom appears, translate the meaning literally unless an approved Denela idiom exists.",
"Translate semantic relations by role rather than copying an ambiguous reference word: ko=and, ke=with a companion.",
"Keep modality distinct from time: su=should, mu=must, fu=will/future."
]
}