Split hyphens in a match the same way the tokenizer does

This commit is contained in:
dualfroz committed 2026-10-03 03:09:19 +02:00
1 parent a85b530171
commit 1440e67433
2 files changed
+10 -8

No files matched your search

+7 -1
View File
@@ -79,7 +79,13 @@ test('match-dash', function (t) {
'fifty-six bottles',
'a 10-minute speech',
'self-serve',
'non-sequitur'
'non-sequitur',
'an x-ray was done',
'the x-ray-machine broke',
'she had covid-19',
'a t-shirt',
'a flower-like shape',
'the president-elect',
]
arr.forEach(str => {
t.equal(nlp(str).has(str), true, here + '[dash] ' + str)