spencermountain / compromise

modest natural-language processing
http://compromise.cool
MIT License
11.41k stars 654 forks source link

[tagger] Possessive Pronoun - noun #621

Open ProfJanetDavis opened 5 years ago

ProfJanetDavis commented 5 years ago

I'm trying to use a match pattern where the verb "is" is incorrectly matched as a noun.

Screenshot from Observable: Screen Shot 2019-09-09 at 2 29 23 PM

This is related to my other issue, #599.

spencermountain commented 5 years ago

hey Janet, i'm not sure I understand your issue. If you call .debug() you can see the current tags, it appears to be tagged correctly: image cheers

ProfJanetDavis commented 5 years ago

Then maybe match() is not working correctly? Here's another example - "borrow" is not a noun as far as I know.

Screen Shot 2019-09-09 at 4 06 13 PM

If this is expected match() behavior, then there's something I really don't understand about it.

spencermountain commented 5 years ago

maybe you've gotten twisted-up using that observables site. image

ProfJanetDavis commented 5 years ago

I'm sorry, I'm really confused by your responses. In the first screenshot you posted, "is" is tagged as a Noun. In the second, "have" is tagged as a Noun. I'm quite certain they are both verbs. Can you clarify?

spencermountain commented 5 years ago

ahh, sorry you're right. lemme give you a proper response later this afternoon

ProfJanetDavis commented 5 years ago

Okay, thanks! BTW, I really appreciate how responsive you've been.

spencermountain commented 5 years ago

ah, you're right. I found the bad-expression here. Good find!

you can always get insight into what's going wrong with nlp.verbose().

var nlp=require('compromise')
nlp.verbose('tagger');

nlp('His is green.').debug();
nlp('i let her have').debug();

i commented it out, and the example 'his fines' no-longer work properly. So it may take a little playing-with Thanks!