(queryTerms: Set<string>, docTerms: Set<string>)
| 370 | } |
| 371 | |
| 372 | function getTermCoverage(queryTerms: Set<string>, docTerms: Set<string>): number { |
| 373 | if (queryTerms.size === 0) return 0; |
| 374 | let matched = 0; |
| 375 | for (const term of queryTerms) { |
| 376 | if (docTerms.has(term)) matched++; |
| 377 | } |
| 378 | return matched / queryTerms.size; |
| 379 | } |
| 380 | |
| 381 | function getMatchedSymbols(symbols: string[], queryTerms: Set<string>): string[] { |
| 382 | if (queryTerms.size === 0) return []; |
no outgoing calls
no test coverage detected