Keep a copula as a verb after a possessive

This commit is contained in:
dualfroz committed 2026-10-03 13:10:28 +02:00
1 parent 56ff279fd7
commit 6528d59d86
2 files changed
+16 -1

No files matched your search

+1 -1
View File
@@ -120,7 +120,7 @@ export default [
// Los Angeles's fundraiser
{ match: '#Place+ #Possessive', tag: 'Possessive', reason: 'place-poss' },
// my butt smells
{ match: '#Possessive #PresentTense #Particle?', notIf: '(#Gerund|her)', tag: 'Noun', reason: 'poss-verb' }, // anna's eating vs anna's eating lunch
{ match: '#Possessive #PresentTense #Particle?', notIf: '(#Gerund|#Copula|her)', tag: 'Noun', reason: 'poss-verb' }, // anna's eating vs anna's eating lunch
// my [teachers] dog
{ match: '(my|our|their|her|his|its) [(#Plural && #Actor)] #Noun', group: 0, tag: 'Possessive', reason: 'my-dads' },
@@ -190,3 +190,18 @@ test('match:', function (t) {
})
t.end()
})
test('possessive before a copula', function (t) {
const arr = [
['His is green.', '#Possessive #Copula #Adjective'],
['Hers is blue.', '#Possessive #Copula #Adjective'],
['Ours are bigger.', '#Possessive #Copula #Adjective'],
['Theirs are old.', '#Possessive #Copula #Adjective'],
]
arr.forEach(function (a) {
const [str, match] = a
const doc = nlp(str)
t.equal(doc.match(match).text(), doc.text(), here + str)
})
t.end()
})