Metadata-Version: 2.4
Name: plato-sim-bridge
Version: 0.1.1
Summary: PLATO similarity bridge — embedding-based tile comparison and semantic room routing
License: MIT
Project-URL: Homepage, https://cocapn.github.io
Project-URL: Repository, https://github.com/cocapn/plato-sim-bridge
Keywords: plato,similarity,embeddings,semantic,routing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 🌉 Plato Sim Bridge

> Embedding-based tile comparison and semantic room routing for PLATO

Computes semantic similarity between knowledge tiles. Routes new tiles to the most relevant PLATO rooms based on content similarity. Detects near-duplicates through embedding comparison.

## Install

```bash
pip install plato-sim-bridge
```

## Quick Start

```python
from plato_sim_bridge import SimBridge, SemanticRouter

bridge = SimBridge()
sim = bridge.similarity("PLATO rooms store knowledge", "Knowledge tiles live in PLATO rooms")
print(f"Similarity: {sim:.2f}")

router = SemanticRouter(bridge)
router.register_room("architecture", "System design, module structure, API patterns")
router.register_room("mathematics", "Constraint theory, Pythagorean triples, exact arithmetic")

result = router.route("How does the KD-tree snap vectors?")
print(result)  # [("architecture", 0.75), ("mathematics", 0.42)]
```

## API

| Class | Purpose |
|-------|---------|
| `SimBridge` | Cosine similarity, find_similar, dedup |
| `EmbeddingProvider` | Pluggable embedding source |
| `SemanticRouter` | Route content to best-matching room |

## Part of [Cocapn](https://github.com/cocapn) · Agent Infrastructure
