Don't read a titlecase gerund after a colon as a proper noun
This commit is contained in:
1 parent
b22c9bdc67
commit
99447e00a1
3 files changed
+27
-4
No files matched your search
@@ -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()
|
||||
})
|
||||
Reference in new issue
Block a user