// src/engine/keyword-matcher/stopwords.ts — Stopword lists + membership helpers (SPEC-577 Phase 1)
/**
 * Common action verbs that appear in imperative criteria ("commit secrets",
 * "validate input") but rarely represent a domain concept worth searching for.
 * Keep lowercase; callers normalize before lookup.
 */
export const ACTION_VERBS = [
    'commit',
    'write',
    'read',
    'delete',
    'create',
    'update',
    'export',
    'import',
    'store',
    'send',
    'push',
    'pull',
    'sync',
    'check',
    'validate',
    'verify',
    'fetch',
    'load',
    'save',
    'remove',
    'add',
    'get',
    'set',
    'put',
    'post',
    'patch',
    'run',
    'execute',
    'parse',
    'render',
    'build',
    'compile',
];
/**
 * Generic English connectors and filler nouns that do not narrow a match.
 * Kept deliberately small — domain stopwords should go through
 * `KeywordMatchOptions.customStopwords`.
 */
export const COMMON_STOPWORDS = [
    'the',
    'and',
    'for',
    'that',
    'this',
    'with',
    'from',
    'into',
    'onto',
    'version',
    'control',
    'system',
    'data',
    'value',
    'field',
    'record',
    'user',
    'item',
    'thing',
    'stuff',
    'something',
    'anything',
];
const ACTION_VERB_SET = new Set(ACTION_VERBS);
const COMMON_STOPWORD_SET = new Set(COMMON_STOPWORDS);
/**
 * True if `word` is a known action verb (case-insensitive).
 */
export function isActionVerb(word) {
    return ACTION_VERB_SET.has(word.toLowerCase());
}
/**
 * True if `word` is in the built-in common-stopword list (case-insensitive).
 * Does NOT consult custom stopwords — callers should check those separately.
 */
export function isStopword(word) {
    return COMMON_STOPWORD_SET.has(word.toLowerCase());
}
/**
 * True if `word` is present in `customStopwords` (case-insensitive).
 */
export function isCustomStopword(word, customStopwords) {
    if (customStopwords.length === 0) {
        return false;
    }
    const lower = word.toLowerCase();
    for (const sw of customStopwords) {
        if (sw.toLowerCase() === lower) {
            return true;
        }
    }
    return false;
}
//# sourceMappingURL=stopwords.js.map