diff --git a/src/2-two/postTagger/model/nouns/nouns.js b/src/2-two/postTagger/model/nouns/nouns.js index 0a05ccb..6da7657 100644 --- a/src/2-two/postTagger/model/nouns/nouns.js +++ b/src/2-two/postTagger/model/nouns/nouns.js @@ -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' }, diff --git a/tests/two/tagger/ambiguity/present-noun.test.js b/tests/two/tagger/ambiguity/present-noun.test.js index 8af2e10..169c6cc 100644 --- a/tests/two/tagger/ambiguity/present-noun.test.js +++ b/tests/two/tagger/ambiguity/present-noun.test.js @@ -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() +})