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

sometimes get wrong offsets #53

Open
WangQiqing opened this issue Jan 25, 2021 · 1 comment
Open

sometimes get wrong offsets #53

WangQiqing opened this issue Jan 25, 2021 · 1 comment

Comments

@WangQiqing
Copy link

I used the ptyhon wrapper with the API from the Open IE 5.1.0 server, it works well on most sentences, but except for this one that gets wrong or empty offsets for the extracted args. I don't know whether the exception is caused by sentence structure or other problems.

>>> from pyopenie import OpenIE5
>>> extractor = OpenIE5('http://localhost:8000')
>>> extractions = extractor.extract("The fire burned 3400 hectares and caused millions of dollars of damage, killed livestock and burned out property.")
>>> extractions
[{'confidence': 0.9030401971054747,
  'sentence': 'The fire burned 3400 hectares and caused millions of dollars of damage, killed livestock and burned out property.',
  'extraction': {'arg1': {'text': 'The fire',
    'offsets': [[0, 1, 2, 3, 4, 5, 6, 7]]},
   'rel': {'text': 'killed', 'offsets': [[9, 10, 11, 12, 13, 14]]},
   'arg2s': [{'text': 'livestock',
     'offsets': [[16, 17, 18, 19, 20, 21, 22, 23, 24]]}],
   'context': None,
   'negated': False,
   'passive': False}},
 {'confidence': 0.9030401971054747,
  'sentence': 'The fire burned 3400 hectares and caused millions of dollars of damage, killed livestock and burned out property.',
  'extraction': {'arg1': {'text': 'The fire',
    'offsets': [[0, 1, 2, 3, 4, 5, 6, 7]]},
   'rel': {'text': 'caused', 'offsets': [[9, 10, 11, 12, 13, 14]]},
   'arg2s': [{'text': 'millions of dollars of damage',
     'offsets': [[16,
       17,
       18,
       19,
       20,
       21,
       22,
       23,
       24,
       25,
       26,
       27,
       28,
       29,
       30,
       31,
       32,
       33,
       34,
       35,
       36,
       37,
       38,
       39,
       40,
       41,
       42,
       43,
       44]]}],
   'context': None,
   'negated': False,
   'passive': False}},
 {'confidence': 0.9990000128746033,
  'sentence': 'The fire burned 3400 hectares and caused millions of dollars of damage, killed livestock and burned out property.',
  'extraction': {'arg1': {'text': 'The fire', 'offsets': [[]]},
   'rel': {'text': 'burned', 'offsets': [[]]},
   'arg2s': [{'text': '3400 hectares', 'offsets': [None]}],
   'context': None,
   'negated': False,
   'passive': False}}]
@GillesJ
Copy link

GillesJ commented Jun 22, 2021

Same issue here, it happens seemingly on sentences with coordinations.

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

No branches or pull requests

2 participants