Skip to content

More failure cases #9

Open
Open

Description

@bobwan1995

For the sentence "Blond caucasian male in black t-shirt and denim jeans wearing converse sneakers , sitting on a blue foldable chair , an orange box on his lap ." The results are:

WeChatdae1dce017d922da28eface0550af7e9

It works well in parsing all entities, but fail in finding their relationships. I find it's common when the subject is followed by more than 1 objects, e.g. here black t-shirt, denim jean, converse sneakers and blue foldable chair, but only the first relationship can be detected (in t-shirt). How can I solve this? Thank you!

Activity

  1. onlyonewater commented on Oct 15, 2020

    @onlyonewater

    Hi, @bobwan1995 , I get the same issue. Did you solve it?

  2. vacancy commented on Mar 1, 2022

    @vacancy
    Owner

    Due to 14ed400, this "and" case should work now.

    In [4]: sng_parser.tprint(
       ...:     sng_parser.parse(
       ...:         "Blond caucasian male in black t-shirt and denim jeans wearing converse sneakers , sitting on a blue foldable c
       ...: hair."
       ...:     )
       ...: )
    Entities:
    +-------------+-----------------------+-----------------+
    | Head        | Span                  | Modifiers       |
    |-------------+-----------------------+-----------------|
    | male        | blond caucasian male  | blond,caucasian |
    | t shirt     | black t-shirt         | black           |
    | denim jeans | denim jeans           |                 |
    | sneakers    | converse sneakers     | converse        |
    | chair       | a blue foldable chair | a,blue,foldable |
    +-------------+-----------------------+-----------------+
    Relations:
    +-------------+------------+-------------+
    | Subject     | Relation   | Object      |
    |-------------+------------+-------------|
    | male        | in         | t shirt     |
    | male        | in         | denim jeans |
    | denim jeans | wearing    | sneakers    |
    | male        | sitting on | chair       |
    +-------------+------------+-------------+
    

    The "orange box" case is tricky.

    First, this sentence isn't very grammatically correct. For example, if you change to comma to period, it will work.

    In [5]: sng_parser.tprint(
       ...:     sng_parser.parse(
       ...:         "Blond caucasian male in black t-shirt and denim jeans wearing converse sneakers , sitting on a blue foldable c
       ...: hair. an orange box on his lap."
       ...:     )
       ...: )
    Entities:
    +-------------+-----------------------+-----------------+
    | Head        | Span                  | Modifiers       |
    |-------------+-----------------------+-----------------|
    | male        | blond caucasian male  | blond,caucasian |
    | t shirt     | black t-shirt         | black           |
    | denim jeans | denim jeans           |                 |
    | sneakers    | converse sneakers     | converse        |
    | chair       | a blue foldable chair | a,blue,foldable |
    | orange box  | an orange box         | an              |
    | lap         | his lap               |                 |
    +-------------+-----------------------+-----------------+
    Relations:
    +-------------+------------+-------------+
    | Subject     | Relation   | Object      |
    |-------------+------------+-------------|
    | male        | in         | t shirt     |
    | male        | in         | denim jeans |
    | denim jeans | wearing    | sneakers    |
    | male        | sitting on | chair       |
    | orange box  | on         | lap         |
    +-------------+------------+-------------+
    

    Second, to fully understand this sentence, we need to do coreference resolution (i.e., his == the male's). This is beyond the scope of this project and I do not foresee a plan for supporting it.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions