UNPKG

agentfootprint

Version:

The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.

15 lines • 932 B
/** * language — whether a unit is English, over a CLOSED stop-word set. The grammar is English * only; a unit in another language is noted `language-unsupported`, never passed silently. * * Pattern: a count, not a model. A unit is unsupported when it is mostly letters of a non-Latin * script, or when one other language's stop words outnumber the English ones (and at * least two of them are there). The foreign lists hold no word that is also common * English (`die`, `den`, `per`, `con`, `as`, `on` are left out), so an English sentence * naming "the San José cluster" stays English. * Role: integrity/ layer (L3), read by `detect.ts`. */ import type { Token } from './matcher.js'; /** Whether a unit can be read by the English grammar. */ export declare function isSupportedLanguage(unitText: string, tokens: readonly Token[]): boolean; //# sourceMappingURL=language.d.ts.map