CoreNLP icon indicating copy to clipboard operation
CoreNLP copied to clipboard

Web gui gives different results to server api for enhanced++ dependencies

Open mercurial-moon opened this issue 1 year ago • 5 comments

I have an offline corenlp server running and also a local version of corenlp.run I sent a query from the web browser with the following options (parts-of-speech, named entities, dependency parse, constituency parse, lemmas, coreference)

The query is

Only the columns to be modified need be mentioned in the SET clause; columns not explicitly modified retain their previous values.

Output

image The word "modified" shows 3 dependencies nsubj:pass - columns mark - to aux:pass - be

if I sent the same command via server api like under

wget --post-data "Only the columns to be modified need be mentioned in the SET clause; columns not explicitly modified retain their previous values." "http://corenlp.com:9000/?properties={\"annotators\":\"tokenize,ssplit,pos,lemma,ner,parse,dcoref\", \"outputFormat\": \"xml\"}" -O corenlp1.xml

then I get the following xml file

<dependencies type="enhanced-plus-plus-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="9">mentioned</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="3">columns</governor>
            <dependent idx="1">Only</dependent>
          </dep>
          <dep type="det">
            <governor idx="3">columns</governor>
            <dependent idx="2">the</dependent>
          </dep>
          <dep type="nsubj:pass">
            <governor idx="9">mentioned</governor>
            <dependent idx="3">columns</dependent>
          </dep>
          <dep type="mark">
            <governor idx="6">modified</governor>
            <dependent idx="4">to</dependent>
          </dep>
          <dep type="aux:pass">
            <governor idx="6">modified</governor>
            <dependent idx="5">be</dependent>
          </dep>
          <dep type="acl:to">
            <governor idx="3">columns</governor>
            <dependent idx="6">modified</dependent>
          </dep>
          <dep type="aux">
            <governor idx="9">mentioned</governor>
            <dependent idx="7">need</dependent>
          </dep>
          <dep type="aux:pass">
            <governor idx="9">mentioned</governor>
            <dependent idx="8">be</dependent>
          </dep>
          <dep type="case">
            <governor idx="13">clause</governor>
            <dependent idx="10">in</dependent>
          </dep>
          <dep type="det">
            <governor idx="13">clause</governor>
            <dependent idx="11">the</dependent>
          </dep>
          <dep type="compound">
            <governor idx="13">clause</governor>
            <dependent idx="12">SET</dependent>
          </dep>
          <dep type="obl:in">
            <governor idx="9">mentioned</governor>
            <dependent idx="13">clause</dependent>
          </dep>
          <dep type="punct">
            <governor idx="9">mentioned</governor>
            <dependent idx="14">;</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="19">retain</governor>
            <dependent idx="15">columns</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="18">modified</governor>
            <dependent idx="16">not</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="18">modified</governor>
            <dependent idx="17">explicitly</dependent>
          </dep>
          <dep type="acl">
            <governor idx="15">columns</governor>
            <dependent idx="18">modified</dependent>
          </dep>
          <dep type="parataxis">
            <governor idx="9">mentioned</governor>
            <dependent idx="19">retain</dependent>
          </dep>
          <dep type="nmod:poss">
            <governor idx="22">values</governor>
            <dependent idx="20">their</dependent>
          </dep>
          <dep type="amod">
            <governor idx="22">values</governor>
            <dependent idx="21">previous</dependent>
          </dep>
          <dep type="obj">
            <governor idx="19">retain</governor>
            <dependent idx="22">values</dependent>
          </dep>
          <dep type="punct">
            <governor idx="9">mentioned</governor>
            <dependent idx="23">.</dependent>
          </dep>
        </dependencies>

Here 2 of the 3 dependencies show correct but 1 of them is wrongly showing governor as "mentioned" instead of "modified"

          <dep type="nsubj:pass">
            <governor idx="9">mentioned</governor>
            <dependent idx="3">columns</dependent>
          </dep>
          <dep type="mark">
            <governor idx="6">modified</governor>
            <dependent idx="4">to</dependent>
          </dep>
          <dep type="aux:pass">
            <governor idx="6">modified</governor>
            <dependent idx="5">be</dependent>
          </dep>

There are some other kinds of mismatches that also show up eg. for the sentence "The crying cat is mine." the web gui shows dependency type for "crying" as "amod" while the api shows it as "compound" for the governor "cat".

mercurial-moon avatar Oct 18 '24 06:10 mercurial-moon