scai
Version:
> **A local-first AI CLI for understanding, querying, and iterating on large codebases.** > **100% local • No token costs • No cloud • No prompt injection • Private by design**
45 lines (44 loc) • 2.3 kB
JavaScript
export const STOP_WORDS = new Set([
// Articles & conjunctions
'a', 'an', 'the', 'and', 'but', 'or', 'nor', 'yet', 'so',
// Prepositions
'at', 'by', 'for', 'from', 'in', 'into', 'of', 'on', 'to', 'with', 'about', 'above',
'below', 'under', 'over', 'through', 'within', 'without', 'across', 'behind', 'near',
// Pronouns
'i', 'me', 'my', 'mine', 'you', 'your', 'yours', 'he', 'him', 'his', 'she', 'her', 'hers',
'it', 'its', 'we', 'us', 'our', 'ours', 'they', 'them', 'their', 'theirs', 'someone', 'something',
// Determiners & quantifiers
'this', 'that', 'these', 'those', 'some', 'any', 'each', 'every', 'either', 'neither',
'few', 'several', 'all', 'many', 'much', 'most', 'more', 'less', 'another',
// Auxiliary and modal verbs
'am', 'is', 'are', 'was', 'were', 'be', 'been', 'being',
'do', 'does', 'did',
'have', 'has', 'had',
'can', 'could', 'shall', 'should', 'will', 'would', 'may', 'might', 'must',
// Wh-words and generic question words
'what', 'which', 'who', 'whom', 'whose', 'where', 'when', 'why', 'how',
// Common verbs (noisy or generic)
'use', 'get', 'set', 'make', 'need', 'want', 'let', 'help', 'work',
'see', 'look', 'like', 'know', 'tell', 'show', 'call', 'create', 'put', 'run',
'start', 'stop', 'begin', 'end', 'open', 'close',
// Functional & filler words
'as', 'if', 'than', 'then', 'there', 'here', 'because', 'so', 'just', 'only',
'not', 'no', 'also', 'again', 'really', 'actually', 'maybe', 'please',
'very', 'too', 'quite', 'rather', 'even', 'still', 'ever', 'never',
'though', 'although', 'indeed', 'perhaps', 'such',
// Command fluff
'explain', 'describe', 'define', 'find', 'give', 'provide', 'show',
'tell', 'check',
// Miscellaneous low-information words
'yes', 'no', 'okay', 'ok', 'thing', 'stuff', 'way', 'anything'
]);
/**
* Stop words used by deterministic pre-grounding file prefiltering.
* Keeps symbol anchors focused on high-signal identifiers.
*/
export const PREFILTER_STOP_WORDS = new Set([
'show', 'only', 'same', 'line', 'without', 'with',
'from', 'into', 'query', 'intent', 'request',
'update', 'modify', 'change', 'output', 'score',
'filename', 'path', 'log', 'function', 'file', 'files', 'code',
]);