Find negation cues and the words they cover; report whether given terms fall inside a negation scope

$0.005 USDC per call · Agent infrastructure · POST /api/v1/negation-scope · Id negation-scope

Applies NegEx-style rules (the English termset of negspacy, MIT, derived from NegEx) to text: finds negation cues, pseudo-negations such as 'not only', and scope terminators such as 'but', and returns each cue's scope window with offsets in UTF-16, code points, UTF-8 bytes and graphemes. Given target terms, reports per occurrence whether it is negated, not negated by the rules, or unknown (near a pseudo-negation). Rule-based and English only: no parsing, double negation and sarcasm are not interpreted. Does not judge truth.

What you get

Stops 'no evidence of fraud' being read as 'fraud'. 50,000 characters per $0.005 call.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/negation-scope. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/negation-scope \
  -H 'content-type: application/json' \
  -d '{"text":"The scan shows no sign of fracture, but there is swelling.","targets":["fracture","swelling"]}'

Input

FieldTypeRequiredDescription
textstring; length 1..50000yesText to analyze.
targetsarray<string; length 0..100>; max 50 itemsnoTerms to classify (literal, case-insensitive, whole words).
windowinteger; 1..20noWords a cue covers (NegEx uses 5). Default 5.

Example request body

{
  "text": "The scan shows no sign of fracture, but there is swelling.",
  "targets": [
    "fracture",
    "swelling"
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
cuesarray<object>; max 500 itemsno
targetsarray<object>; max 50 itemsno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the context-evidence-kit package.

Machine-readable