Expand description
Semantic Structured Compression — RML-1208
Compresses verbose memory content into structured summaries targeting ~30x token reduction using rule-based NLP techniques. Pure computation — no database access, no network I/O.
§Pipeline
- Split text into sentences
- Strip filler and hedging phrases
- Extract proper nouns and number/date entities
- Derive subject-verb-object cores
- Deduplicate near-identical sentences (Jaccard > 0.6)
- Reassemble structured_content and key_facts
§Invariants
- Never panics on any input (including empty strings)
- Token estimation uses
text.len() / 4 - Short content below
min_content_lengthis returned verbatim
Structs§
- Compressed
Memory - The result of compressing a single piece of text.
- Compression
Config - Configuration for the semantic compressor.
- Semantic
Compressor - Rule-based semantic compressor — no ML required.