openeventdata / UniversalPetrarch

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

Not Returning Expected Codes #15

Closed efaurie closed 6 years ago

efaurie commented 6 years ago

Now that the Verb Dictionary traversal has been repaired, I'm still having issues with the coding. When I submit the below XML, I don't get the expected code assignments.

When this is fed through the system the resulting codes are <SOURCE [EVENT] TARGET>

USA [null] --- null [---] --- null [---] null null [null] null null [042] CHN

But I would expect the output to be something like this:

USA [042] CHN CHN [043] USA

Am I missing something?

CONLL XML Here \/

<?xml version='1.0' encoding='utf-8'?>
<Sentences>
    <Sentence date="20180221" id="3c72774e-4c2d-47dd-a66a-e3c8181b60cb_1" sentence="True" source="User">
        <Text>
        The stopover came as the US leader prepared to attend the Beijing Olympics, an event which will test his vow to keep politics out of the Games.
    </Text>
        <Parse>
        1   The the DET DT  _   2   det
        2   stopover    stopover    NOUN    NN  _   3   nsubj
        3   came    come    VERB    VBD _   0   ROOT
        4   as  as  ADP IN  _   8   mark
        5   the the DET DT  _   7   det
        6   US  us  PROPN   NNP _   7   compound
        7   leader  leader  NOUN    NN  _   8   nsubj
        8   prepared    prepare VERB    VBD _   3   advcl
        9   to  to  PART    TO  _   10  aux
        10  attend  attend  VERB    VB  _   8   xcomp
        11  the the DET DT  _   13  det
        12  Beijing beijing PROPN   NNP _   13  compound
        13  Olympics    olympics    PROPN   NNPS    _   10  dobj
        14  ,   ,   PUNCT   ,   _   13  punct
        15  an  an  DET DT  _   16  det
        16  event   event   NOUN    NN  _   13  appos
        17  which   which   ADJ WDT _   19  nsubj
        18  will    will    VERB    MD  _   19  aux
        19  test    test    VERB    VB  _   16  relcl
        20  his -PRON-  ADJ PRP$    _   21  poss
        21  vow vow NOUN    NN  _   19  dobj
        22  to  to  PART    TO  _   23  aux
        23  keep    keep    VERB    VB  _   19  advcl
        24  politics    politic NOUN    NNS _   23  dobj
        25  out out ADP IN  _   23  prep
        26  of  of  ADP IN  _   25  prep
        27  the the DET DT  _   28  det
        28  Games   games   PROPN   NNPS    _   26  pobj
        29  .   .   PUNCT   .   _   3   punct
    </Parse>
    </Sentence>
</Sentences>
JingL1014 commented 6 years ago

Currently, the coder is trying to extract events from the main verb in the sentence, which is identified as "ROOT" in the parsed tree (the last column) and resolve the interactions between main verb and other verbs in the sentence. In your example, "came" is the main verb in the sentence, but no code is related to it. The coder extracts other events like "US leader prepared.." with code "USA [null] ---" and "... attend the Beijing Olympics" with code "null [042] CHN". We are still working on it to handle those sentences.

efaurie commented 6 years ago

I gotcha; thanks for the quick response @JingL1014