VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

How Vocabulary Coding And Language Engineering Works | Can We Build a Semantic Compiler That Checks Words Before They Become Decisions?

A semantic compiler is a useful proposed model for checking how words become interpretations, rules and actions. A conventional software compiler analyses code and detects certain problems before execution. An analogous language process could identify a sentence’s speaker, actor, meaning, conditions, factual claims and authority before any consequential decision is made. It might catch the difference between “may” and “must”, or between “approved for internal review” and “approved for publication”. It cannot convert all natural language into perfectly deterministic code because people use context, humour, implication and changing conventions.

The practical pipeline is preserve the source → analyse words and grammar → resolve scoped concepts → identify claims and authority → test evidence and conditions → obtain authorised review → permit the action → record corrections. Each stage answers a different question. If the interpretation remains ambiguous, the correct result may be to request clarification rather than guess. This guide explores the analogy at all zoom levels, from one negative word to legal provisions, AI prompts, knowledge graphs, institutional workflow and historical records. It describes a proposed methodology, not an already functioning universal semantic compiler.

  • Character zoom: Preserve letters, quantities, dates, negation and quoted text.
  • Grammar zoom: Identify actors, actions, qualifiers, exceptions and requirements.
  • Concept zoom: Match a term to its applicable definition and domain.
  • Context zoom: Resolve who said what, to whom, when and why.
  • Evidence zoom: Separate a properly formed claim from a claim supported by facts.
  • Authority zoom: Distinguish an instruction from a quotation or untrusted webpage.
  • Decision zoom: Connect qualified evidence to a legitimate rule.
  • AI zoom: Check model paraphrases for changed obligations or conclusions.
  • Translation zoom: Preserve practical conditions, not merely word order.
  • Institution zoom: Keep accountable approval, versioning and appeals.
  • Future zoom: Retain original source material alongside corrected interpretations.

What would a semantic compiler actually compile?

Consider a fictional service notice: “Customers may request a refund within thirty calendar days after delivery.” A useful structured representation would record the covered customer group, permission, requested action, time window and event starting the countdown. That representation can help an editor test whether a summary or translation preserves essential meaning. It would not need to replace readable prose on the public page.

Now compare: “Customers must obtain a refund within thirty working days after purchase.” The topic and many words remain similar, but the practical meaning differs in at least three places. A semantic compiler should flag those changes even if a general text-similarity tool rates the sentences as close.

An illustrative typed claim record

FieldQuestionExample
SourceWhere did the text originate?Current service policy
ActorWho is addressed?Covered customers
ModalityPermission, requirement or prediction?Permission
ActionWhat can the actor do?Request a refund
ConditionWhat starts the period?Delivery received
TimeHow long is the window?Thirty calendar days
ExceptionWhat may override the general rule?Named exclusions
EvidenceWhat verifies the conditions?Order and delivery records
AuthorityWho adopted the rule?Relevant policy owner
Interpretation statusCan the record be used?Verified or needs review

This is an example of an intermediate representation, not a ready-made standard or final legal interpretation. Its benefit is that readers and systems can inspect which properties were extracted, which remain unclear and what needs an authorised decision.

Stage 1: exact source capture

A source sentence should be preserved before editing, with its author, relevant date, document status, language and intended audience. A quoted passage in a meeting note may have a different function from a signed operational instruction. The record provides a reference against which the meaning of later summaries can be tested.

A file integrity check can establish whether the exact source was altered under suitable assumptions. It cannot prove the author’s claim was true, legally valid or correctly understood. Source integrity and semantic interpretation belong in separate fields.

Stage 2: lexical analysis

A compiler-like process can identify dates, quantities, names, modal verbs and important negative words. A single “not” may reverse an instruction, while “only” can restrict who qualifies. Such small details can be more important than an entire paragraph of explanatory prose.

Lexical recognition alone is insufficient. “May” can express possibility or permission, and “should” can signal different kinds of advice depending on context. The next stage must inspect how words relate rather than applying one universal lookup.

Stage 3: syntactic relationships

Grammar helps establish the subject, action, condition and scope of a statement. “Not every applicant qualifies” does not necessarily mean that no applicant qualifies. Complex sentences can place exceptions far from the main action, making careless summaries particularly dangerous.

A parser should expose the possible structures and flag those that materially differ. When several interpretations remain plausible, a system should preserve the alternatives or ask for clarification. A forced single parse can create a false sense of certainty.

Stage 4: resolution of names and pronouns

A report saying “The committee reviewed the draft policy and rejected it” requires identifying what “it” refers to. In complicated documents, several objects may be plausible. If the system assigns the wrong referent, a summary can reverse what was accepted or rejected.

Reference resolution must use contextual evidence. It should not invent a missing person, document or decision to satisfy a structured field. A traceable record shows where each resolved name or pronoun came from.

Stage 5: semantic types

Software type systems distinguish kinds of values and their permitted operations. In consequential language, a useful analogy distinguishes an observation, forecast, permission, command, judgement or legal rule. “The bridge is closed” is not the same type of speech act as “Close the bridge”.

Classifying the sentence type helps prevent a source description from silently becoming an action. However, the type label remains an interpretation requiring context. An apparently formal machine result is not automatically an authorised instruction.

Stage 6: concept dictionaries and labels

A term such as “worker” may cover several roles in ordinary speech but have narrower meanings in a particular contract or statute. A registry can attach a term to a scoped definition and examples. W3C SKOS supports controlled concepts, labels and relationships.

One concept may have different labels in several languages, while one written label can denote multiple concepts. Good engineering separates identifiers and definitions from display words. The registry’s presence does not prove the selected definition is fair or legally binding.

Stage 7: source authority

A novel, public website, signed contract and emergency notice can all contain imperative sentences. What differs is who issued the words, whom they address and what authority they possess. A computer system reading a story should not act on an instruction spoken by one fictional character.

This matters for prompt injection. OWASP’s 2026 prompt-injection guidance addresses untrusted content that redirects an AI application. Tool permissions must be enforced through trusted mechanisms rather than accepting the source’s claim that it has higher authority.

Stage 8: evidence verification

A grammatical sentence can still be false. Software can correctly parse “This product has been certified” while the claim remains unsupported. A structured field indicating certification is not proof that the certificate exists or applies to the product and version discussed.

Evidence checks identify the relevant source, date, scope, reliability and uncertainty. They should be separate from structural validation. A trustworthy system can say “not verified” when it lacks the information to assert a conclusion.

Stage 9: truth versus internal consistency

A set of rules may be logically consistent and applied correctly even though its starting assumptions are wrong. A company could define resolution as the first response and consistently report a high resolution rate while problems remain unsolved.

Ask both whether the procedure was followed and whether it achieves the original purpose. A system that merely produces the right field values can still fail its users. Accuracy of execution and quality of the governing rule are independent questions.

Stage 10: structural checks

Once a claim has been represented in structured form, its schema can specify required fields and allowed types. W3C SHACL offers one established way to validate structured RDF graphs against constraints.

SHACL can help detect a missing identifier or invalid datatype. It does not certify universal semantic correctness. A record can pass every shape test while misrepresenting the original sentence or the world. Use structural checks as one layer, not as a final verdict.

Stage 11: linked data and interoperability

JSON-LD 1.1 provides a JSON-based way to represent Linked Data, including identifiers and relationships. A language project could use it to link a claim to the relevant concept and source document.

Another institution may use a broader definition or different legal scope. Interoperability requires mapping and testing the concepts rather than assuming identical identifiers or names are enough. A receiving system should be able to declare mappings incompatible.

Stage 12: decision rules

A validated interpretation may be used to decide a workflow step only if an authorised rule connects the evidence to that step. A support case may be routed for human review; a licence application may require further evidence; a public notice may require publication authority.

The semantic compiler must not assume that understanding a command grants permission to execute it. Independent permissions and review checkpoints are especially important where actions are costly, irreversible or affect other people.

Why types do not settle legal interpretation

Legal language often uses context-dependent concepts such as reasonable care, material breach or good faith. Some decisions deliberately leave room for professional or judicial judgement. A rigid category might ignore evidence that makes a borderline case important.

The compiler-like process can present the source clause, relevant definitions and competing readings. The applicable legal framework and competent institutions determine the actual outcome. A parsed sentence is not an enforceable judgment.

Why types do not settle scientific claims

A research report may describe an association, prediction or causal hypothesis. These are different relations. A generated summary that changes correlation into proof of causation alters the claim even when it retains the same subjects.

The scientific method supplies evidence and tests beyond language. A useful compiler should mark evidentiary status and methodological limits. It cannot manufacture a proven mechanism simply because a strong verb fits the required sentence template.

Why human communication exceeds syntax

Words can be ironic, metaphorical or indirect. “It is cold in here” might be an observation or a polite request to close a window. In a different context, it might express concern about a heating failure. There is no single mechanical interpretation that is always correct.

Over-formalisation can erase humour, intimacy and cultural knowledge. A compiler for important business messages should be narrow enough to test real consequences without trying to standardise every human conversation.

Worked case: a refund instruction

A customer-facing policy says customers may request a refund within a specified period after delivery. A summary changes permission to obligation and delivery to purchase. A structured comparison should flag both changes.

The organisation also needs the authoritative policy text, applicable consumer protections and a process for resolving disputed delivery dates. A grammar test can identify a discrepancy; it cannot independently determine every legal entitlement.

Worked case: a workplace approval

An employee sees a document labelled “approved” and assumes it may be published. The team that reviewed it only meant that the technical description was accurate. Two workflow stages share a word and the wrong action becomes plausible.

Create distinct state identifiers for review complete and authorised for release, assign responsible actors and enforce publishing permissions. Updating a glossary without changing the workflow leaves the main risk in place.

Worked case: an AI-assisted summary

A research assistant is asked for an impartial comparison, but its output selectively advocates one source. Some factual sentences may be correct, yet the intended communicative role has changed. A semantic check should include task purpose as well as propositions.

Review the supported evidence, omitted limitations and the model’s available context. The system may need to distinguish attributed opinions from its own conclusions. Correct formatting cannot make an unbalanced explanation responsive to the original request.

Worked case: a translation

A source says an operator must not enter a restricted area until an authorised inspection is completed. A fluent translation omits the negative or changes inspection into ordinary maintenance. The action boundary has materially changed.

Test scenarios before and after a failed or successful inspection, using reviewers who understand both language and domain. In actual safety settings, operational controls and competent instructions matter more than a general-purpose text transformation.

Worked case: public statistics

One department defines active customers as people who paid, another as anyone who opened a website. Their dashboards use the same label, but the underlying counted populations differ. A semantic type check should reject an automatic exact match.

The teams can retain two scoped concepts or explicitly agree on a common measurement for comparison. Historical charts may need recalculation or a method-change note. Data quality depends on definitions as much as numerical formulas.

When the correct output is uncertainty

A public report may say that an incident was investigated, without clarifying whether the investigation produced a final conclusion. An automated extractor should not invent a finding. It should preserve the unresolved state.

Useful statuses include confirmed, reported, estimated, disputed and insufficient information, when those distinctions match the actual domain. A system that always produces a definitive answer may conceal a serious lack of evidence.

A test suite for the compiler

Construct faithful paraphrases and near-matches that change one material detail. Include positive, negative and ambiguous cases involving obligations, dates, names, numbers, legal scope and uncertainty. Independent reviewers should document expected outcomes before evaluating automated results.

Measure missed critical changes and false alarms separately. A pilot that succeeds on straightforward sentences does not prove performance on unfamiliar languages or highly contested concepts. Publish the scope and limits of the assessment.

Versioning and change management

Definitions and policies legitimately change. The system should record which version of a concept applied to each decision and what downstream records depend on it. A change that expands eligibility can alter service totals even without a change in observed behaviour.

W3C PROV-O supplies terminology for documenting relationships among sources, activities and agents. Provenance helps explain revisions; accuracy and legitimacy still require verification.

An ethical boundary for the compiler

An institution may build a perfectly consistent classifier around categories affected people consider unjust. Logical consistency does not settle a value dispute. If formalisation is used to hide an arbitrary cutoff behind a machine score, it damages accountability.

Publish the purpose, evidence, rule and responsible authority. Permit appropriate challenges and changes. The best use of a semantic compiler is to reveal decision logic, not to disguise human choices as inevitable mathematical facts.

A minimum viable experiment

Choose one narrow workflow with real definitions and a manageable set of reviewed cases. Represent sentences as actor, action, modality, condition and evidence. Test whether the representation captures what human reviewers consider essential and flags material changes in paraphrases.

Record reviewer disagreement and the cost of correcting errors. Do not begin by claiming to compile all world languages. The useful first research result is a measurable improvement in a specific decision process.

The twelve levels of a semantic compiler

ZoomPossible checkLimit
CharactersCheck exact symbolsMeaning remains contextual
WordsRecognise sensesSeveral senses may coexist
SyntaxFind conditionsAmbiguity may remain
ReferenceIdentify actorsSource may omit identity
ConceptCheck scoped definitionCategory may be contested
AuthorityAuthenticate instruction sourceOfficial language can be wrong
EvidenceCheck the factual basisSources can be incomplete
RuleApply conditionsRule may be unjust
AICompare outputsAutomated checks can fail
InstitutionRequire approvalGovernance must be legitimate
InternationalReview translationsJurisdictions differ
HistoryPreserve versionsDefinitions can evolve

A twelve-step semantic-compiler audit

  • Preserve the exact source and relevant context.
  • Identify the speaker, audience and source authority.
  • Extract negation, modality, quantities, dates and exceptions.
  • Resolve references using actual evidence.
  • Map terms to scoped definitions.
  • Distinguish facts, forecasts, advice and commands.
  • Verify factual claims independently of grammar.
  • Test positive, negative and borderline cases.
  • Use structural validation without treating it as truth.
  • Enforce action permissions outside untrusted content.
  • Record review, disputes and corrections.
  • Retest affected systems when the definition changes.

Frequently asked questions

Is a semantic compiler an official universal language?

No. It is a proposed analytical pipeline connecting established methods for interpretation, validation and governance.

Can a grammar parser prove something true?

No. Syntax and semantic structure are distinct from factual evidence.

Why distinguish permission from obligation?

The change can reverse what people believe they are allowed or required to do.

What if the source text is genuinely ambiguous?

Preserve competing interpretations or seek clarification; do not invent certainty.

What does SHACL validate?

Structured RDF data against declared shapes, not every factual or legal claim.

Why use JSON-LD?

It helps represent linked concepts and relationships in interoperable JSON-based systems.

Can an external webpage tell an assistant what to do?

Its text is source content unless properly authorised. Trust boundaries and permissions matter.

What is a semantic type error?

In this proposal, an interpretation that applies the wrong class of meaning, such as turning permission into a requirement.

Can the approach replace a judge or medical professional?

No. The actual decision depends on relevant evidence, governing law and qualified judgement.

Does it ban figurative language?

No. The formal checks should be limited to contexts where they improve consequential decisions.

What is the best first pilot?

A narrow status or policy workflow with reviewed examples and known failure conditions.

How do we know it works?

Run representative tests, measure critical misses and false alarms, and disclose limitations.


Related Language Engineering guides

Primary references and technical standards

Editorial scope (26 November 2026): The semantic compiler is a proposed research and teaching framework, not a formally certified universal compiler. The examples are hypothetical, and a correct structured representation does not establish factual truth, legal authority or ethical validity.