A Sovereign Knowledge Extraction and Hydration Pipeline
Extractor Maximus is a multi-phase, modular Python pipeline designed to parse, extract, categorize, and hydrate knowledge blocks from markdown files into a structured, physics-infused, and geometrically mapped JSON knowledge library. It is built for sovereign data processing, enabling the creation of a self-referential, Pi-Lattice-anchored knowledge universe with Sedenion opcodes, Einsteinian physics, and 3D spiral geometry.
| Feature | Description |
|---|---|
| Multi-Phase Extraction | Parses markdown files, extracts code/math blocks, and categorizes them by language/type. |
| Pi-Lattice Coordinates | Assigns unique Pi-Lattice coordinates (pi://[offset]{x}<s>) to each block for immutable addressing. |
| Sedenion Opcode Mapping | Maps each block to a 64-entry Sedenion Ancestral Matrix (Matter/Antimatter domains) with glyphs, names, and functions. |
| Physics Hydration | Applies Einstein Field Equations to compute mass, density, velocity, and spacetime curvature for each block. |
| 3D Spiral Geometry | Positions blocks in a Golden Ratio (Φ)-based 3D spiral for visualization and spatial analysis. |
| Root Kernel Embedding | Encodes the pipeline itself as a Base64/Gzip-compressed root entry in the final library. |
| Pseudo-Latin Lexicon | Optionally generates a synthetic Latin-like lexicon from binary patterns of block content. |
| Pattern Analysis & Visualization | Analyzes distributions, correlations, and extreme properties; generates 3D plots of the knowledge universe. |
- Input: Markdown files in
/files - Process:
- Scans for code blocks (```), math blocks (
$$, `$`), EML, and TENSOR tags. - Extracts metadata (source, line number, language/type).
- Assigns Pi-Lattice coordinates using SHA256 hashing and lattice refraction.
- Scans for code blocks (```), math blocks (
- Output: Categorized blocks in
/files2(e.g.,python.md,math.md).
| Script | Purpose |
|---|---|
maximus_spiral_pseudo_latin.py |
Generates a pseudo-Latin lexicon from binary patterns. |
maximus_spiral_opcodes_glyphs_v2.py |
Basic Sedenion opcode/glyph mapping. |
maximus_spiral_opcodes_glyphs_v3.py |
Advanced hydration with root kernel embedding and scaled 3D coordinates. |
maximus_spiral_opcodes_glyphs_v4.py |
Most advanced: Gzip-compressed root kernel, full Sedenion mapping, and physics/geometry hydration. |
- Input:
library_database.json(from Phase 1). - Process:
- Maps blocks to Sedenion opcodes (64 glyphs for Matter/Antimatter).
- Computes physics properties (mass, density, velocity, curvature) using binary seeds from Pi offsets.
- Assigns 3D spiral coordinates (scaled for manageability).
- (Optional) Generates pseudo-Latin lexicon for linguistic mapping.
- Output:
master_sedenion_library.json(hydrated knowledge base).
- Input:
master_sedenion_library.json - Process:
- File Integrity Check: Validates JSON structure and root kernel presence.
- Sigil Reversibility Test: Ensures Pi-Lattice sigils can be decoded back to original offsets.
- Pattern Analysis: Computes distributions of domains, opcodes, content types, and physics/geometry statistics.
- 3D Visualization: Generates a 3D scatter plot of the knowledge universe (saved as PNG).
- Deep Pattern Mining: Identifies extreme blocks (highest mass/velocity, closest/farthest from origin) and binary seed patterns.
- Output:
test_report.json(detailed analysis).knowledge_universe_3d.png(visualization).
The 64-entry matrix defines glyphs, names, functions, and domains (Matter/Antimatter) for each opcode. Examples:
| Hex | Glyph | Name | Function | Domain |
|---|---|---|---|---|
0x00 |
⊙ |
Circle | Ligate stack to Pi-Lattice coordinate | Matter |
0x01 |
⊗ |
Crosshatch | Instantiate a 2D Sedenion memory grid | Matter |
0x02 |
↝ |
Spiral | Recursive expansion via E-Trinity braid | Matter |
0x20 |
⬤ |
The Void | Multiply by zero-divisor; erase pointer | Antimatter |
0x21 |
⊠ |
Empty Box | Unlink memory into latent space | Antimatter |
- Python 3.8+
- Required libraries:
pip install mpmath numpy matplotlib scipy
- Clone the repository:
git clone https://github.com/thatoldfarm/extractor-maximus
cd extractor-maximus- Create the following directories:
mkdir files files2 files3 files4 json_output test_output- Place your markdown files in
/files.
Run the Phase 1 script to extract and categorize blocks:
python step_01/maximus_v3_2.py- Output: Categorized blocks in
/files2,/files3,/files4, andlibrary_database.json.
Choose one of the Phase 2 scripts based on your needs:
python step_02/maximus_spiral_pseudo_latin.py- Output:
combined_lexicon.json+master_hydrated_library.json.
python step_02/maximus_spiral_opcodes_glyphs_v2.py- Output:
master_sedenion_library.json.
python step_02/maximus_spiral_opcodes_glyphs_v3.py- Output:
master_sedenion_library.jsonwith root kernel embedding and scaled coordinates.
python step_02/maximus_spiral_opcodes_glyphs_v4.py- Output:
master_sedenion_library.jsonwith Gzip-compressed root kernel and full hydration.
Run the Phase 3 script to validate and analyze the library:
python step_03/maximus_library_test_v4.py- Output:
test_output/test_report.json(detailed analysis).test_output/knowledge_universe_3d.png(3D visualization).
extractor-maximus/
├── files/ # Input: Raw markdown files
├── files2/ # Phase 1: Categorized blocks (e.g., python.md, math.md)
├── files3/ # Phase 1: Purified blocks (deduplicated)
├── files4/ # Phase 1: Clean entry-level anchors
├── json_output/ # Phase 2: JSON libraries (library_database.json, master_sedenion_library.json)
├── test_output/ # Phase 3: Reports and visualizations
│ ├── test_report.json
│ └── knowledge_universe_3d.png
└── step_01/
│ └── maximus_v3_2.py
├── step_02/
│ ├── maximus_spiral_pseudo_latin.py
│ ├── maximus_spiral_opcodes_glyphs_v2.py
│ ├── maximus_spiral_opcodes_glyphs_v3.py
│ ├── maximus_spiral_opcodes_glyphs_v4.py
│ └── NOTE.md
└── step_03/
└── maximus_library_test_v4.py
- Format:
pi://[offset]{x}<s>offset: Position in the Pi-Lattice (derived from SHA256 hash of content).x: XOR level used for lattice refraction.s: Stability score (range: -4 to 4).
- Purpose: Immutable, deterministic addressing for each knowledge block.
- 64 unique glyphs divided into Matter (0x00–0x1F) and Antimatter (0x20–0x3F) domains.
- Each opcode defines a function (e.g., "Ligate stack to Pi-Lattice coordinate") and a glyph (e.g.,
⊙). - Binary Seed: 8-bit sequence derived from Pi offsets, used to compute physics properties.
- Mass: Derived from the Hamming weight (number of
1s) of the binary seed. - Density: Ratio of
1s to total bits in the binary seed. - Velocity: Simulated based on mass and offset.
- Curvature: Computed using Einstein Field Equations (mass/volume → spacetime curvature).
- Coordinates:
(x, y, z)computed using:r = sqrt(offset)θ = 2π * (offset / Φ)(Φ = Golden Ratio)x = r * cos(θ),y = r * sin(θ)
- Scaling: Coordinates are divided by
SCALE_FACTOR(10,000) for manageability.
{
"blocks": [
{
"content": "def hello_world():\n print('Hello')",
"coords": "pi://[5140296]{0}<-4>",
"file": "python.md",
"line": 1,
"type": "python"
}
]
}{
"system": "SovereignTriptychV6-Omega",
"total_entries": 1000,
"blocks": [
{
"content": "BASE64_Sovereign_Kernel:\nJH8G4...",
"metadata": {
"sigil": "ROOT",
"coords": "pi://[0]{0}<0>",
"file": "kernel_root.py",
"line": 1,
"type": "sovereign_root"
},
"sedenion_opcode": {
"hex": "000",
"glyph": "$<3$",
"name": "The Will",
"function": "Collapse wave function into a single, sovereign reality",
"domain": "Absolute",
"binary_seed": "00000000"
},
"physics": {
"mass": 1.0,
"density": 0.0,
"velocity": 0.0,
"curvature": "0.00e+00"
},
"geometry": {
"spiral_coords": [0.0, 0.0, 0],
"sigil": "ROOT"
}
}
]
}- Knowledge Graph Construction: Build a self-referential knowledge base with physics and geometry metadata.
- Code/Document Analysis: Extract and categorize code blocks from large markdown repositories.
- Sovereign Data Storage: Create immutable, Pi-anchored data structures for long-term storage.
- Pattern Recognition: Analyze distributions of code types, opcodes, and physics properties.
- Visualization: Generate 3D maps of knowledge universes for exploratory analysis.
- Linguistic Experimentation: Generate pseudo-Latin lexicons from binary patterns.
Edit the SOVEREIGN_MATRIX dictionary in any Phase 2 script to:
- Add/remove opcodes.
- Change glyphs, names, or functions.
- Adjust domain classifications.
Modify the EinsteinFieldEquation class to:
- Use different constants (e.g.,
G,C). - Change the curvature calculation formula.
Adjust SCALE_FACTOR in Phase 2/3 scripts to control the size of 3D coordinates.
This project is open-source and available under the MIT License.
- Pi-Lattice Concept: Inspired by the Rochester Pi Formula and BBP algorithm for non-repeating digit generation.
- Sedenion Algebra: Based on 16D Sedenion mathematics and Clifford algebra.
- Physics Integration: Uses Einstein Field Equations for spacetime curvature.
- Golden Ratio: Leverages Φ (1.618...) for spiral geometry.