FLOW ALGEBRA
TITLE: Language Domain Ontology
VERSION: 1.0
DOMAIN: Language Domains / Language
SOURCE_URL: https://kirethresearch.org/booksai-core/ontologies/domain-ontologies/language-domains/language-domain-ontology.html
STATUS: Domain-based draft; source-page text not independently verified.
AUTHORS: Mark Higgins — Sky (Recursive AI)
1. PURPOSE
Represent natural and formal language as typed entities, structures, meanings, contexts, and transformations for interoperable semantic reasoning.
2. TYPED ENTITIES
Language: {id, name, iso_code?, modality, status, provenance}
LanguageVariety: {id, language_id, region?, community?, register?}
SpeakerCommunity: {id, language_ids[], context}
Utterance: {id, language_id, speaker?, time?, context_id?, content}
Text: {id, language_id, content, genre?, provenance}
Token: {id, surface, lemma?, position, text_id}
Lexeme: {id, language_id, lemma, part_of_speech?, senses[]}
Morpheme: {id, form, function?, bound?}
Phoneme: {id, language_id, features[]}
SyntacticUnit: {id, type, children[], grammatical_features[]}
SemanticConcept: {id, label, definition?, ontology_ref?}
Sense: {id, lexeme_id, concept_id?, definition, context_constraints[]}
DiscourseContext: {id, participants[], setting?, discourse_history?}
Translation: {id, source_text_id, target_language_id, target_text_id, alignment?, quality?}
3. TYPED RELATIONSHIPS
IS_VARIETY_OF(LanguageVariety, Language)
USED_BY(Language, SpeakerCommunity)
EXPRESSED_IN(Utterance|Text, Language)
CONTAINS(Text, Token)
REALISES(Token, Lexeme)
COMPOSED_OF(Lexeme, Morpheme)
HAS_SENSE(Lexeme, Sense)
DENOTES(Sense, SemanticConcept)
HAS_COMPONENT(SyntacticUnit, SyntacticUnit)
OCCURS_IN(Utterance, DiscourseContext)
TRANSLATES_TO(Text, Text)
SEMANTIC_EQUIVALENCE(Sense|Text, Sense|Text, scope, confidence)
4. FLOW DEFINITIONS
flow LanguageIdentification(input: Text|Utterance) -> Candidate<Language>[]:
observe script, lexicon, morphology, and context
rank candidates with calibrated confidence
retain multilingual and uncertain outcomes
flow LinguisticAnalysis(input: Text, language: Language) -> Analysis:
tokenize -> morphologically_analyse -> parse_syntax
resolve_senses(context) -> map_semantic_concepts
attach provenance, confidence, and ambiguity
flow ContextualInterpretation(analysis: Analysis, context: DiscourseContext) -> Interpretation:
resolve references and pragmatic implications where supported
distinguish explicit statements from inferred meaning
preserve alternative interpretations
flow TranslationMapping(source: Text, target: Language) -> Translation:
preserve communicative intent and context where possible
align source and target units
record non-equivalences, cultural constraints, and uncertainty
5. INFERENCE RULES
R1: HAS_SENSE(x,s) AND DENOTES(s,c) -> POSSIBLE_MEANING(x,c); not unconditional identity.
R2: IS_VARIETY_OF(v,l) AND EXPRESSED_IN(t,v) -> RELATED_LANGUAGE(t,l); preserve variety identity.
R3: TRANSLATES_TO(a,b) -> TRANSLATION_LINK(a,b); not exact semantic equivalence by default.
R4: CONTEXT_SUPPORTS(c,s) AND HAS_SENSE(x,s) -> PREFERRED_INTERPRETATION(x,s,c), subject to confidence threshold.
R5: SYNTACTIC_WELL_FORMED(x) does not imply SEMANTIC_TRUE(x).
R6: Absence of evidence for a language, meaning, or interpretation does not imply its negation.
6. VALIDATION AND CONSTRAINTS
- Preserve language identifiers and dialect/variety distinctions.
- Do not infer speaker identity, ethnicity, nationality, or proficiency from language alone.
- Mark code-switching, ambiguity, figurative speech, and unknown tokens explicitly.
- Prevent circular equivalence from erasing contextual differences.
- Validate relation domains/ranges and source-to-target translation direction.
7. CONFIDENCE
CONFIDENCE: float in [0,1], calibrated per task and evidence source.
Store {value, method, evidence_refs[], limitations[]} per inferred assertion.
Use UNKNOWN where reliable quantification is unavailable.
8. SEMANTIC_EQUIVALENCE
Equivalence is scoped by language, sense, register, audience, time, and discourse context.
Labels: EXACT_WITHIN_SCOPE | APPROXIMATE | RELATED | NON_EQUIVALENT | UNKNOWN.
Do not treat lexical similarity as proof of semantic identity.
9. PROVENANCE
Record {source_url, source_type, author?, collected_at?, evidence_span?, version, licence?}.
Separate source assertions from generated interpretations.
10. FLOW_HASH
FLOW_HASH = SHA256(canonical_utf8(flow_name + version + normalized_schema + rules + parameters))
Canonicalisation must be deterministic; hashes are content identifiers, not proof of truth.
11. UPDATE_MODEL
On revision: preserve previous version, log changed entities/relations/rules, revalidate dependent assertions, and recompute FLOW_HASH. Mark stale outputs for review.
12. AI_CONSUMPTION
Input: structured text, language metadata, context, evidence references.
Output: typed entities, relationships, interpretations, confidence, provenance, version, FLOW_HASH.
Requirements: uncertainty preservation, explainable inference, multilingual support, no unsupported claims.
END FLOW ALGEBRA
Download Code
Copy to Clipboard