menthurin
v0.1.0
Published
Lightweight claim consistency heuristics for short natural-language statements.
Maintainers
Readme
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 menthurinUse:
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 menthurinUse:
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