You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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!
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.
Activity
onlyonewater commentedon Oct 15, 2020
Hi, @bobwan1995 , I get the same issue. Did you solve it?
vacancy commentedon Mar 1, 2022
Due to 14ed400, this "and" case should work now.
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.
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.