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

Noun chunking missing root nouns? #469

Closed
jmugan opened this issue Aug 4, 2016 · 5 comments
Closed

Noun chunking missing root nouns? #469

jmugan opened this issue Aug 4, 2016 · 5 comments
Labels
bug Bugs and behaviour differing from documentation

Comments

@jmugan
Copy link

jmugan commented Aug 4, 2016

When I run the noun chunker over the phrase "100 tacos with a side of rice" it returns "a side" and "rice" but not "100 tacos".

The word "tacos" has the dependency label (dep_) of "ROOT". I think the problem may be that english_noun_chunks in spacy.syntax.iterators has 'root' as lowercase. See line 5

labels = ['nsubj', 'dobj', 'nsubjpass', 'pcomp', 'pobj',
              'attr', 'root']

When I add 'ROOT' to labels it works as expected and returns "100 tacos". Of course, there may be a reason that 'root' is different from 'ROOT' that I am not aware of.

@honnibal
Copy link
Member

honnibal commented Aug 9, 2016

Definitely a bug — thanks for the report.

If you have time, would you mind submitting a pull request with a test and the patch?

@jmugan
Copy link
Author

jmugan commented Aug 9, 2016

Will do!

@jmugan
Copy link
Author

jmugan commented Aug 10, 2016

I put in the change and the test, but when I try to build locally with python setup.py build_ext --inplace I get the error listed at http://9.media.readthedocs.io/projects/spacy/builds/3893054/

@honnibal honnibal modified the milestone: Version 1.0 Release Sep 21, 2016
@honnibal honnibal added the bug Bugs and behaviour differing from documentation label Sep 27, 2016
@honnibal
Copy link
Member

Broken build is sadness — I want to make sure this doesn't happen in future.

Anyway. The problem is fixed for 1.0. Thanks again for the report.

@lock
Copy link

lock bot commented May 9, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bugs and behaviour differing from documentation
Projects
None yet
Development

No branches or pull requests

2 participants