Skip to main content

Module query_shape

Module query_shape 

Source

Structs§

QueryShape
ShapeWeights

Enums§

QueryKind

Functions§

classify
contains_all_content_tokens
Return whether every normalized query content token occurs in the supplied text slice. Exact-tier fusion supplies at most three consecutive source lines and exits as soon as every requested token has been observed.
extract_content_tokens
Unique lowercase natural-language tokens with stopwords and words shorter than the three-character trigram minimum removed.
extract_explicit_code_tokens
Code-shaped tokens that are explicit enough to use for semantic name priors inside natural-language queries. Bare prose words are excluded: a lone capitalized word like “Engine” is too ambiguous unless quoted, while adjacent TitleCase words are treated as one qualified name such as “Engine.Index”.
extract_lexical_tokens
Tokens supplied to the trigram search during hybrid retrieval and a lexical retry after zero results. Natural-language queries contribute normalized content words with stopwords removed. Regex retries prefer explicit code-shaped tokens before falling back to identifier-shaped text.
extract_short_nl_lexical_tokens
Legacy wrapper that delegates natural-language token extraction.
extract_tokens
is_type_concept_identifier_query
looks_like_regex
minimum_content_token_window
Find the narrowest all-token window of at most three source lines. Tracking the most recent line for each token avoids rejoining overlapping windows; identifier matches cannot span the newline separators used by those windows.
pre_tier_exempt