Text Processing Pipeline

NAL/PLN Split Architecture — From Raw Text to Formal Reasoning

Raw Text Inputuser message / documentNLP Extractionlemma + entity + relationSemantic Parsetriples + context framesTruth Value Assignfrequency + confidenceSPLITNAL Pathinheritance similarity |-PLN PathIntSet Implication |~NAL Inferencededuction revisionPLN Inferencemodus ponens + bayesMerge Resultsrevision + confidence mergeNL Generationback to natural languageMemory Store
12
Pipeline Stages
2
Reasoning Engines
NAL+PLN
Logic Frameworks
MeTTa
Runtime

1. What This Pipeline Does

This system takes raw natural language text and converts it into formal logical statements that a machine can reason over. English in, math-like logic out, new conclusions generated, then translated back to English.

2. Raw Text Input

Everything starts with text — a chat message, a paragraph, a claim like Sam is friends with Garfield. The pipeline needs to understand what this means before it can reason about it.

3. NLP Extraction

NLP breaks the sentence apart: lemmatization (reducing words to root forms), entity recognition (Sam, Garfield are entities), and relation extraction (the relation is friends). This stage is mechanical — no reasoning yet.

4. Semantic Parse

Extracted pieces get assembled into subject-predicate-object triples. Sam → friends → Garfield becomes a structured representation. Ambiguity gets resolved here.

5. Truth Value Assignment

Every statement gets a truth value — a pair (frequency, confidence). Frequency = how often true (0-1). Confidence = how much evidence (0-1). Example: (stv 1.0 0.9) means always true, high confidence. This makes the system probabilistic rather than binary.

6. The Split — NAL vs PLN

The pipeline forks into two parallel reasoning engines:

NAL Path (Non-Axiomatic Logic)

Uses inheritance (-->), similarity (<->), and implication (==>). The inference operator |- applies syllogistic rules.

(|- ((--> sam human) (stv 1.0 0.9)) ((--> human mortal) (stv 1.0 0.9)))
Deduces: Sam is mortal

PLN Path (Probabilistic Logic Networks)

Uses IntensionalSets, Implication, and the operator |~ for probabilistic modus ponens and Bayesian reasoning.

(|~ ((Implication (Inheritance $1 (IntSet Feathered)) (Inheritance $1 Bird)) (stv 1.0 0.9)) ((Inheritance Pingu (IntSet Feathered)) (stv 1.0 0.9)))
Concludes: Pingu is likely a Bird

7. NAL Inference Details

Deduction: A→B, B→C therefore A→C. Abduction: A→B, C→B therefore A→C (weaker). Revision: two evidence pieces merge — confidence increases.

Revision is NOT averaging — it uses evidence-theoretic formula where more evidence = higher confidence.

8. PLN Inference Details

PLN handles intensional reasoning — reasoning about properties and categories. Bayes rule updates beliefs when new evidence arrives.

9. Merging Results

Both engines produce conclusions with truth values. Merge uses revision to combine evidence into stronger truth values.

10. Natural Language Generation

Formal conclusions translated back to English. (--> sam mortal) (stv 1.0 0.9) becomes: Sam is mortal (very likely, high confidence).

11. Memory Store

Conclusions stored for future use — accumulating knowledge over time.

12. When to Use NAL vs PLN

13. Key Takeaway

This is a reasoning engine that speaks English. Every conclusion has mathematical justification with explicit uncertainty tracking. No black-box guessing.