Skip to content

repyh/shiro-recursive-intent-parser

Repository files navigation

SHIRO: Semantic Hierarchical Intent Recursive Operator

SHIRO is a lightweight, recursive NLU engine designed to split complex multi-intent sentences into atomic actions without relying on heavy Transformer-based attention. It uses a recursive MLP head and GRU-based context tracking to achieve high precision with minimal overhead.

Key Stats

  • F1-Score: 0.95+
  • Precision: 99.3%
  • Latency: ~60ms (CPU/GPU)
  • Idiom Protection: 94%+ (Native semantic bond handling)

Quick Start

1. Requirements

  • Python 3.10+
  • pip install -r requirements.txt

2. Interactive Testing

Run the CLI to test splits manually:

python cli.py

3. Verification

Execute the pro benchmark suite:

python bench_pro.py

Structure

  • src/: Core logic (MLP Splitter, GRU History, Recursive Parser).
  • data/production/: Active training corpus.
  • data/benchmark/: Gold-standard test set.
  • research/: Archived tuning scripts and diagnostics.
  • tools/: Data generators and management utilities.

Core Logic

Unlike standard "bag-of-words" or linear classifiers, SHIRO treats sentence parsing as a binary tree construction. It evaluates the "Split Energy" at every word junction, using previous intent history as a dynamic bias. Resulting trees allow for complex execution pipelines in agentic systems.


MIT License

About

SHIRO: Semantic Hierarchical Intent Recursive Operator. A lightweight top-down recursive parser designed for high-precision and low-latency intent discovery in real-time speech pipelines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages