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>)
| 1886 | * variants). Segments are recomputed in JS — a name-keyed vocab lookup |
| 1887 | * would scan the (segment, name) primary key. */ |
| 1888 | private wordsMatchingName(name: string, variantToWord: Map<string, string>): Set<string> { |
| 1889 | const segments = new Set(splitIdentifierSegments(name)); |
| 1890 | const matched = new Set<string>(); |
| 1891 | for (const [variant, word] of variantToWord) { |
| 1892 | if (segments.has(variant)) matched.add(word); |
| 1893 | } |
| 1894 | return matched; |
| 1895 | } |
| 1896 | |
| 1897 | /** |
| 1898 | * One-shot upgrade heal for callers that open the graph WITHOUT syncing — |
no test coverage detected