Mutato Synonym Swapping API
Project description
mutato
Ontology-driven synonym swapping for semantic text enrichment. Mutato identifies terms in input text and replaces them with semantically equivalent synonyms sourced from OWL ontologies, enabling consistent, structured analysis of natural language content.
Use Cases
- Normalize terminology across transcripts before downstream analysis
- Enrich tokens with ontology-backed synonym candidates
- Bridge informal language to structured vocabulary in NLP pipelines
Quick Start
from mutato.parser import owl_parse
results = owl_parse(tokens=["student", "learned", "math"], ontologies=[...])
Installation
make all
This downloads the spaCy model, installs dependencies, runs tests, builds the package, and freezes requirements.
Or step by step:
make get_model # download en_core_web_sm
make install # poetry lock + install
make test # run pytest
make build # install + test + poetry build
make freeze # export requirements.txt
Architecture
Mutato is organized into four modules:
| Module | Purpose |
|---|---|
mutato.parser |
Main API -- synonym swapping and token matching |
mutato.finder |
Ontology lookup across single and multiple OWL graphs |
mutato.mda |
Metadata and NER enrichment generation |
mutato.core |
Shared utilities (file I/O, text, validation, timing) |
See docs/architecture.md for design details.
Matching Strategies
The parser applies multiple matching passes in order:
- Exact -- literal string match against ontology terms
- Span -- multi-token window matching
- Hierarchy -- parent/child concept traversal
- spaCy -- lemma and POS-aware NLP matching
Requirements
- Python >= 3.10, < 3.14
- Poetry for dependency management
- spaCy
en_core_web_smmodel (installed viamake get_model)
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mutato-0.5.23.tar.gz.
File metadata
- Download URL: mutato-0.5.23.tar.gz
- Upload date:
- Size: 59.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.11.9 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7468624bf49e143388db97294cd4dc7e436c9063fb607ec99e48a1f6fa8a6ec
|
|
| MD5 |
74ea59e739708c8d021a53bbec538c19
|
|
| BLAKE2b-256 |
a8c4cb49c4fba02c2765c6d6fa3e618d6e813a0a7e7f0185deb05fcbde29f173
|
File details
Details for the file mutato-0.5.23-py3-none-any.whl.
File metadata
- Download URL: mutato-0.5.23-py3-none-any.whl
- Upload date:
- Size: 104.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.11.9 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bc5b8f67ee8d141ecc60bb914b1799452ac69499259303e1e71d40440784c2d
|
|
| MD5 |
ddc90c47339a7cc09ad78e6c4f4985dc
|
|
| BLAKE2b-256 |
8fe7ccfb01a0caf8376fdcce71b872c29190368910526995ae081f16651a4a46
|