MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / getKeywordCoverage

Function getKeywordCoverage

src/tools/semantic-identifiers.ts:116–124  ·  view source on GitHub ↗
(queryTerms: Set<string>, input: string)

Source from the content-addressed store, hash-verified

114}
115
116function getKeywordCoverage(queryTerms: Set<string>, input: string): number {
117 if (queryTerms.size === 0) return 0;
118 const docTerms = new Set(splitTerms(input));
119 let matched = 0;
120 for (const term of queryTerms) {
121 if (docTerms.has(term)) matched++;
122 }
123 return matched / queryTerms.size;
124}
125
126function isDefinitionLine(line: string, symbolName: string): boolean {
127 const escaped = escapeRegex(symbolName);

Callers 2

rankCallSitesFunction · 0.85
semanticIdentifierSearchFunction · 0.85

Calls 1

splitTermsFunction · 0.85

Tested by

no test coverage detected