(text)
| 3330 | } |
| 3331 | |
| 3332 | function tokenizeKnowledgeText(text) { |
| 3333 | return String(text || "") |
| 3334 | .toLowerCase() |
| 3335 | .replace(/[^a-z0-9\u4e00-\u9fff-]+/g, " ") |
| 3336 | .split(/\s+/) |
| 3337 | .map((token) => token.trim()) |
| 3338 | .filter((token) => token.length > 2 && !keywordStopWords.has(token) && !/^\d+$/.test(token)); |
| 3339 | } |
| 3340 | |
| 3341 | function aliasLabelsForText(text) { |
| 3342 | return phraseAliases |
no outgoing calls
no test coverage detected