Skip to content

Noun chunking missing root nouns? #469

Closed

Description

@jmugan

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.

Activity

  1. honnibal commented on Aug 9, 2016

    @honnibal
    Member

    Definitely a bug — thanks for the report.

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

  2. jmugan commented on Aug 9, 2016

    @jmugan
    Author

    Will do!

  3. jmugan commented on Aug 10, 2016

    @jmugan
    Author

    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/

  4. added
    bugBugs and behaviour differing from documentation
    on Sep 27, 2016
  5. added a commit that references this issue on Sep 27, 2016
  6. honnibal commented on Sep 27, 2016

    @honnibal
    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.

  7. lock commented on May 9, 2018

    @lock

    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.

  8. locked as resolved and limited conversation to collaborators on May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs and behaviour differing from documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions