Meaning / Resolve a word

Resolve a word in context

Use resolve when you have a passage and a target expression within it. It returns a candidate sense, alternatives, and uncertainty.

Make the request#

const result = await superb.resolve({
  text: 'The auditor identified a material error in the report.',
  target: 'material',
});

HTTP equivalent: POST /v1/resolve. The passage may contain up to 12,000 characters; the target may contain up to 100 characters and must occur as a complete word or phrase.

Handle all outcomes#

Result What to show
sense is present The selected candidate and its source context
status: "unresolved" Alternatives and a request for more context
status: "not_found" The reference has no suitable inventory entry
abstention: "AMBIGUOUS_TARGET" Ask which occurrence the person intended

Do not turn a null sense into an error or replace it with the first alternative. Candidate selection is not independent validation.

Select a repeated occurrence#

Supply span: [start, end] using JavaScript UTF-16 offsets. The end is exclusive, and the selected text must match the target. Preserve the exact input string when computing offsets; trimming or changing emoji first can move the selection.

Keep provenance#

Retain release, source, mode, and model when saving a result. A bootstrap reference can have a null release hash; do not invent an immutable release ID for it.

Next: Compare two usages or inspect many spans.

Editorial reference inventory#

resolve({ text, target, inventory: "reference" }) uses the current public Reference inventory, including clarified glosses and sourced slang. This is an editorial view, not an accepted consensus release. The returned source includes the inventory integrity digest. Omit inventory to retain the accepted-release behavior, and use release to pin that behavior. inventory: "reference" cannot be combined with release. Source links and usage rights remain attached to the alternatives.