Lightweight claim consistency heuristics for short natural-language statements.
Project description
menthurin
menthurin is a tiny, dependency-free toolkit for checking whether short natural-language claims support, contradict, or merely relate to each other.
It is intentionally lightweight: the package uses token overlap, negation cues, hedge words, and a small antonym table instead of a full machine-learning model. That makes it fast enough for CLIs, local scripts, package hooks, and simple content-quality checks.
This repository is structured so the same idea can be published to both npm and PyPI under the same name.
What it does
- Analyze a statement for content tokens, negation, and hedging.
- Compare two short claims and label the relationship.
- Audit a list of claims pairwise to surface likely contradictions.
- Provide a small CLI in both ecosystems.
JavaScript
Install:
npm install menthurin
Use:
import { analyzeStatement, compareStatements, auditClaims } from "menthurin";
console.log(analyzeStatement("The service is probably online."));
console.log(compareStatements("The service is online.", "The service is not online."));
console.log(auditClaims([
"The migration finished successfully.",
"The migration did not finish.",
"The dashboard is online."
]));
CLI:
menthurin analyze "The service is probably online."
menthurin compare "The service is online." "The service is not online."
menthurin audit "The migration finished." "The migration did not finish." "The dashboard is online."
Python
Install:
pip install menthurin
Use:
from menthurin import analyze_statement, compare_statements, audit_claims
print(analyze_statement("The service is probably online."))
print(compare_statements("The service is online.", "The service is not online."))
print(audit_claims([
"The migration finished successfully.",
"The migration did not finish.",
"The dashboard is online.",
]))
CLI:
menthurin analyze "The service is probably online."
menthurin compare "The service is online." "The service is not online."
menthurin audit "The migration finished." "The migration did not finish." "The dashboard is online."
Relationship labels
support: the claims share core terms and point in the same direction.contradiction: the claims share context but disagree through negation or antonyms.related: the claims overlap, but not strongly enough to infer support.unrelated: there is not enough shared context to say they are about the same thing.
Local verification
npm test
python3 -m unittest discover -s tests
npm pack
uv build
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 menthurin-0.1.0.tar.gz.
File metadata
- Download URL: menthurin-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a94ae2e89bc0d43ca961239cc690597e659d75e5981627b09521e8ba4dc2e292
|
|
| MD5 |
5820ed7c4acd92195efa1f05553c249d
|
|
| BLAKE2b-256 |
bd48f78e7fed92d94a646ff7dea2d2c04afdba1e01292c4a5e2b2d9a21e1fc34
|
File details
Details for the file menthurin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: menthurin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a1f5732aa08551bf76ef24b54a3f3e9e336ee4c2568d262452d3e45a1c88948
|
|
| MD5 |
9eb9bedbb2e4a0a96e330d0c5116d40b
|
|
| BLAKE2b-256 |
cc3591c4a0218a98f0182a2769367da3e9059fe6efe6865b3a453a5eae3596b0
|