spencermountain / compromise

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

Determiner mistook for adjective #1122

Closed NikhilVerma closed 4 months ago

NikhilVerma commented 4 months ago

Steps to reproduce

Parse the following sentence: "All information and data must be classified for criticality and sensitivity"

Result from compromise: All is classified as an adjective

Result from CodeNLP (which uses Stanford parser): All is classified as determiner

spencermountain commented 4 months ago

hey Nikhil - you're right that this is a tricky case, and that we differ from the stanford parser understanding.

I dunno - I do think that all information is describing the information, just like it would be in all the information.

You're free of course to change it - I would do:

doc.match('[all] #Noun', 0).tag('Determiner')

let me know if you feel strongly against the current tagging. cheers