Don't read a titlecase gerund after a colon as a proper noun

This commit is contained in:
dualfroz committed 2026-10-03 15:24:07 +02:00
1 parent b22c9bdc67
commit 99447e00a1
3 files changed
+27 -4

No files matched your search

+14
View File
@@ -119,3 +119,17 @@ test('match:', function (t) {
})
t.end()
})
test('titlecase after a colon', function (t) {
const arr = [
['Tutorial: Creating a cake', '. #Gerund #Determiner #Noun'],
['Step two: Mixing the flour', '. #Value #Gerund the #Noun'],
['On Tuesday: Baking a cake', 'on #Date #Singular a #Noun'],
]
arr.forEach(function (a) {
const [str, match] = a
const doc = nlp(str)
t.equal(doc.match(match).text(), doc.text(), here + str)
})
t.end()
})