Which of the prompt's original words match `name`'s segments (via * variants). Segments are recomputed in JS — a name-keyed vocab lookup * would scan the (segment, name) primary key.
(name: string, variantToWord: Map<string, string>)
| 2867 | * variants). Segments are recomputed in JS — a name-keyed vocab lookup |
| 2868 | * would scan the (segment, name) primary key. */ |
| 2869 | private wordsMatchingName(name: string, variantToWord: Map<string, string>): Set<string> { |
| 2870 | const segments = new Set(splitIdentifierSegments(name)); |
| 2871 | const matched = new Set<string>(); |
| 2872 | for (const [variant, word] of variantToWord) { |
| 2873 | if (segments.has(variant)) matched.add(word); |
| 2874 | } |
| 2875 | return matched; |
| 2876 | } |
| 2877 | |
| 2878 | /** |
| 2879 | * One-shot upgrade heal for callers that open the graph WITHOUT syncing — |
no test coverage detected