Skip to main content

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

Release files for menthurin 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for menthurin 0.1.0
File Size Uploaded
menthurin-0.1.0.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for menthurin 0.1.0
File Interpreter ABI Platform
menthurin-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 kB

Release files / menthurin-0.1.0.tar.gz

Download URL menthurin-0.1.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a94ae2e89bc0d43ca961239cc690597e659d75e5981627b09521e8ba4dc2e292
BLAKE2b-256 checksum
How to use checksums
bd48f78e7fed92d94a646ff7dea2d2c04afdba1e01292c4a5e2b2d9a21e1fc34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release files / menthurin-0.1.0-py3-none-any.whl

Download URL menthurin-0.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a1f5732aa08551bf76ef24b54a3f3e9e336ee4c2568d262452d3e45a1c88948
BLAKE2b-256 checksum
How to use checksums
cc3591c4a0218a98f0182a2769367da3e9059fe6efe6865b3a453a5eae3596b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page