Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"wanna" is not parsed correctly when followed by a noun #1126

Open
roschler opened this issue Jul 21, 2024 · 1 comment
Open

"wanna" is not parsed correctly when followed by a noun #1126

roschler opened this issue Jul 21, 2024 · 1 comment

Comments

@roschler
Copy link

roschler commented Jul 21, 2024

In a sentence like:

I wanna pickle

The library adds an extra implicit term to the terms object array for the word "to". This is incorrect in the above sentence because pickle is a noun and the library does tag it correctly as such, so it's not a case of the library thinking "pickle" is a verb as in "I want to pickle some beets". Instead, the library should add a determiner instead with the implicit text being "a". It looks like the library is not inspecting the tags of the term that triggers the creation of the pure implicit term, to see if it is a noun instead of a verb. Note, it probably should choose "a" instead of "to" if the word after "wanna" is an adjective too (e.g. - "I wanna green pickle"), but I have not thought about this exhaustively enough to make a blanket recommendation. In fact, it may be prudent to add a rule that says if the very next word after "wanna" is anything but a verb, choose "a" instead of "to".

@spencermountain
Copy link
Owner

hey Robert, yeah you're right.
I can add it to the next release.
cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants