Metadata-Version: 2.4
Name: plato-tile-dedup
Version: 0.1.0
Summary: 4-stage tile similarity — exact, keyword Jaccard, embedding cosine, structure
Author-email: SuperInstance Fleet <fleet@cocapn.ai>
License: MIT
Project-URL: Homepage, https://github.com/SuperInstance/plato-tile-dedup
Project-URL: Repository, https://github.com/SuperInstance/plato-tile-dedup
Keywords: plato,tiles,deduplication,similarity,ai,knowledge
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# plato-tile-dedup

4-stage tile similarity — exact, keyword Jaccard, embedding cosine, structure.

Part of the [PLATO framework](https://github.com/SuperInstance) — deterministic AI knowledge management through tile-based architecture.

## Installation

```bash
pip install plato-tile-dedup
```

## Usage

```python
from plato_tile_dedup import TileDeduplicator

dedup = TileDeduplicator(threshold=0.85)

tiles = [
    {"id": "1", "content": "Pythagorean triples snap to exact coordinates"},
    {"id": "2", "content": "Pythagorean triples snap to exact coordinates"},  # duplicate
    {"id": "3", "content": "Constraint theory maps continuous vectors to discrete space"},
]

unique = dedup.dedup_batch(tiles)
print(len(unique))  # 2 (tile 2 removed as duplicate of tile 1)
```

## 4 Similarity Stages

| Stage | Weight | Method |
|-------|--------|--------|
| Exact | 0.1 | Content hash comparison |
| Keyword | 0.3 | Token-level Jaccard overlap |
| Embedding | 0.5 | Cosine similarity (requires embedding model) |
| Structure | 0.1 | Domain and question type matching |

Zero external dependencies. Compatible with Python 3.8+.

[GitHub](https://github.com/SuperInstance/plato-tile-dedup)
