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

Example Python Usage returns no Events or Issues #4

Open
nzv8fan opened this issue Apr 20, 2017 · 2 comments
Open

Example Python Usage returns no Events or Issues #4

nzv8fan opened this issue Apr 20, 2017 · 2 comments

Comments

@nzv8fan
Copy link

nzv8fan commented Apr 20, 2017

The example python code in the Readme.md file generates different output to that which is stated in the Readme.md file.

Stated output:
{u'abc123': {u'meta': {u'date': u'20010101'}, u'sents': {u'0': {u'content': u'At least 37 people are dead after Islamist radical group Boko Haram assaulted a town in northeastern Nigeria .', u'events': [[u'NGAREBMUS', u'NGA', u'190']], u'issues': [[u'ID_EXTREMISM', 1], [u'NAMED_TERROR_GROUP', 1]], u'parsed': u'(ROOT (S (NP (QP (IN AT ) (JJS LEAST ) (CD 37 ) ) (NNS PEOPLE ) ) (VP (VBP ARE ) (ADJP (JJ DEAD ) ) (SBAR (IN AFTER ) (S (NP (JJ ISLAMIST ) (JJ RADICAL ) (NN GROUP ) (NNP BOKO ) (NNP HARAM ) ) (VP (VBD ASSAULTED ) (NP (NP (DT A ) (NN TOWN ) ) (PP (IN IN ) (NP (JJ NORTHEASTERN ) (NNP NIGERIA ) ) ) ) ) ) ) ) (. . ) ) )'}}}}

Output from a fresh install of Hypnos
{u'abc123': {u'sents': {u'0': {u'content': u'At least 37 people are dead after Islamist radical group Boko Haram assaulted a town in northeastern Nigeria .', u'parsed': u'(ROOT (S (NP (QP (IN AT ) (JJS LEAST ) (CD 37 ) ) (NNS PEOPLE ) ) (VP (VBP ARE ) (ADJP (JJ DEAD ) ) (SBAR (IN AFTER ) (S (NP (JJ ISLAMIST ) (JJ RADICAL ) (NN GROUP ) (NNP BOKO ) (NNP HARAM ) ) (VP (VBD ASSAULTED ) (NP (NP (DT A ) (NN TOWN ) ) (PP (IN IN ) (NP (JJ NORTHEASTERN ) (NNP NIGERIA ) ) ) ) ) ) ) ) (. . ) ) )', u'issues': [], u'events': []}}, u'meta': {u'date': u'20010101', u'verbs': {u'nouns': [[[u' PEOPLE'], [u'~PPL'], [[u'~']]], [[u' ISLAMIST', u' BOKO HARAM'], [u'NGAREBMUS'], [[u'~'], [u'NGAREB', []]]], [[u' NIGERIA'], [u'NGA'], [[u'NGA', []]]]]}}}}`

I'm assuming either the docker file has failed to download something or something else has changed which is resulting in this lack of data coming through.

There are no errors or warnings from Python or Docker.

@johnb30
Copy link
Member

johnb30 commented May 1, 2017

There's a few possible things going on that we need to investigate.

  1. PETR2 isn't hitting on the right verb phrases. This is a deeper coding issue with PETR2 and would indicate that we need to change the example sentence.
  2. PETR2 is coding things, but it isn't surfacing it through the events field. If you dig into the meta field you'll see:
u'verbs': {u'nouns': [[[u' PEOPLE'], [u'~PPL'], [[u'~']]], [[u' ISLAMIST', u' BOKO HARAM'],
 [u'NGAREBMUS'], [[u'~'], [u'NGAREB', []]]], [[u' NIGERIA'], [u'NGA'], [[u'NGA',[]]]]]}}}}

The verbs: nouns construction is a whole different issue that needs to get cleaned up. This is all related to this issue: openeventdata/petrarch2#15.

I'll see if I can poke around in things, or maybe @ahalterman or @philip-schrodt has some cycles to spare.

@philip-schrodt
Copy link

Yes, doesn't surprise me at all, but I'm not clear whether we still want to be investing efforts in PETR-2 or are waiting PETR-UD to be deployed. I should have some time to work on this the second half of this month [May] if it is still relevant by that point.

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

3 participants