openeventdata / UniversalPetrarch

Language-agnostic political event coding using universal dependencies
MIT License
18 stars 9 forks source link

UniversalPetrarch not coding verb phrase in dictionary #32

Closed ahalterman closed 5 years ago

ahalterman commented 6 years ago

The Petrarch2 verb dictionary has an entry on line 4184 for "upgrade base" being coded as 062. When I run the sentence below through UniversalPetrarch, however, it doesn't return any event:

The Georgian government is upgrading its bases in Turkey.

JingL1014 commented 6 years ago

This error is caused by the dependency parser. The parser incorrectly drop "e" in "upgrade" after lemmatization. I add a rule in the coder to check both verb lemma from parser and verb lemma by adding an extra "E" at the end. Now the output of coder is GEOGOV TUR 062.

Following is the output of parser:

1   The the DET DT  Definite=Def|PronType=Art   3   det _   _
2   Georgian    Georgian    ADJ JJ  Degree=Pos  3   amod    _   _
3   government  government  NOUN    NN  Number=Sing 5   nsubj   _   _
4   is  be  AUX VBZ Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin   5   aux _   _
5   upgrading   upgrad  VERB    VBG Tense=Pres|VerbForm=Part    0   root    _   _
6   its its PRON    PRP$    Gender=Neut|Number=Sing|Person=3|Poss=Yes|PronType=Prs  7   nmod:poss   _   _
7   bases   base    NOUN    NNS Number=Plur 5   obj _   _
8   in  in  ADP IN  _   9   case    _   _
9   Turkey  Turkey  PROPN   NNP Number=Sing 7   nmod    _   _
10  .   .   PUNCT   .   _   5   punct   _   _