Superb

Every text, as a typed document.

One call reads a text as a document your code can hold: tokens and morphemes, phrases and clauses, what each clause asserts and with what force, what pronouns point to, each word's sense in context, and the slots the wording leaves empty. Every record has a span. Deterministic, free, no key.

read.mjs
const reading = await superb.read({
  text: 'Fees may apply if you cancel after 30 days.',
});

reading.propositions[0]
// { actor: { text: 'Fees', sense: { gloss: 'a fixed charge…' } }, predicate: { lemma: 'apply' },
//   modality: 'possible', condition: 'c2', gaps: [{ slot: 'amount', ask: 'How much?' }] }
read({ text: 'Fees may apply if you cancel after 30 days.' })

The reading says the fees are possible, not certain; that the sentence depends on a condition; that the amount is missing (“How much?”) and the 30 days have no start (“Counted from what?”). None of that is a guess about intent: it is the structure of the sentence.

An illustrative reading.

A composing stick holding set lines of metal type, over a case of sorted letters
A sentence set in metal type: every letter a separate, countable piece. Willi Heidelbach, CC BY 2.5, greyscale

Exact where language is exact

Tokens, morphology, phrases, clauses, propositions and references come from a pinned tagger and rules, with no probabilities.

Explore exact where language is exact

Senses with their strength

Each word's sense is chosen with its neighbours' and comes with alternatives and a measured strength, never a confidence score.

Explore senses with their strength

A schema a model can be held to

The reading ships as JSON Schema and TypeScript types, and the validator checks spans, quotes, ids and senses, for your output or a model's.

Explore a schema a model can be held to