Skip to content

API Reference parrot.knowledge.wiki.glossary.matcher

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

parrot.knowledge.wiki.glossary.matcher

View source

Deterministic glossary matching: exact longest-match plus a typo-tolerant lane (FEAT-917).

Standard library only at module level: this module runs in the coding-host prompt hook.

Attribute FUZZY_MIN_ALIAS_LEN

Class GlossaryMatcher

Resolve a text to the glossary aliases it contains.

Parameter Type Default Description
bank Mapping[str, Any]
fuzzy bool True

Method GlossaryMatcher.match

Return match dicts (keys of TermMatch) in text order; never raises.

match(text: str) -> list[dict[str, Any]]

Parameter Type Default Description
text str

Returns: list[dict[str, Any]]

Method GlossaryMatcher.consumed_spans

Return character spans consumed by the last match call.

consumed_spans() -> list[tuple[int, int]]

Returns: list[tuple[int, int]]

Attribute MAX_INPUT_CHARS

Attribute MAX_NGRAM

Attribute logger

Function normalize_text

Casefold, strip accents and punctuation, collapse whitespace.

normalize_text(text: str) -> str

Parameter Type Default Description
text str

Returns: str

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally