wojtuch / boxer2java

Piece of code that can be used for deserializing the XML Boxer output.
Apache License 2.0
1 stars 0 forks source link

Element 'taggedtokens' does not have a match in class com.github.wojtuch.boxer2java.models.Xdrs at line 7 #1

Open WilliamsRizzi opened 8 years ago

wojtuch commented 8 years ago

could you please show me, which input leads to that error? I will try to set up candc on my machine and get back to you once I have it up and running again

WilliamsRizzi commented 8 years ago

After downloading boxer2java and fixed some misplaced classes (it was just a matter of fixing their package name) i provided a working boxer candc and boxerModels binaries path to the re.properties file. Done this it gives me this error:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xdrs-output SYSTEM "src/data/boxer/xdrs.dtd"><xdrs-output version="'boxer v2606 (macosx build on 23 February 2016, 13:56:14)'"></xdrs-output>
Exception in thread "main" org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(entry=, inline=true, data=false, name=, type=void, required=true, empty=true) on field 'xdrs' private java.util.List com.github.wojtuch.boxer2java.models.XdrsOutput.xdrs for class com.github.wojtuch.boxer2java.models.XdrsOutput at line 1
    at org.simpleframework.xml.core.Composite.validate(Composite.java:644)
    at org.simpleframework.xml.core.Composite.readElements(Composite.java:449)
    at org.simpleframework.xml.core.Composite.access$400(Composite.java:59)
    at org.simpleframework.xml.core.Composite$Builder.read(Composite.java:1383)
    at org.simpleframework.xml.core.Composite.read(Composite.java:201)
    at org.simpleframework.xml.core.Composite.read(Composite.java:148)
    at org.simpleframework.xml.core.Traverser.read(Traverser.java:92)
    at org.simpleframework.xml.core.Persister.read(Persister.java:625)
    at org.simpleframework.xml.core.Persister.read(Persister.java:606)
    at org.simpleframework.xml.core.Persister.read(Persister.java:584)
    at org.simpleframework.xml.core.Persister.read(Persister.java:562)
    at org.simpleframework.xml.core.Persister.read(Persister.java:499)
    at org.simpleframework.xml.core.Persister.read(Persister.java:408)
    at com.github.wojtuch.boxer2java.Boxer2Java.fromString(Boxer2Java.java:29)
    at com.github.wojtuch.boxer2java.Examples.main(Examples.java:21)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Process finished with exit code 1

Now if i add the required=false in xdrs-output class:

@ElementList(inline=true, required=false)
    private List<Xdrs> xdrs;

It works without throwing exceptions but the resulting xdrs in console is empty. Excuse me for the late reply.

wojtuch commented 8 years ago

You mean b2j.properties file, right?

Could you comment out the lines which delete the temp files in CommandLine.java in getAnnotationAsXmlString(String input) method? What is their content?

Maybe the parser simply doesn't produce the Xdrs elements... Have you tried using the normal C&C + Boxer pipeline to parse your sentence (without my wrapper)? What is its output?

WilliamsRizzi commented 8 years ago

The sentence i’m trying to parse is the one contained into the Example.java code. Regarding C&C -> Boxer pipeline the input seems correctly parsed by C&C but not from Boxer, as you can see in attach, it seems not able to create a correct representation in xml.

On 13 Apr 2016, at 12:58, Wojciech Łukasiewicz notifications@github.com wrote:

You mean b2j.properties file, right?

Could you comment out the lines which delete the temp files in CommandLine.java in getAnnotationAsXmlString(String input) method? What is their content?

Maybe the parser simply doesn't produce the Xdrs elements... Have you tried using the normal C&C + Boxer pipeline to parse your sentence (without my wrapper)? What is its output?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/wojtuch/boxer2java/issues/1#issuecomment-209366274

Barack Hussein Obama II is the 44th and current President of the United States, and the first African American to hold the office. Born in Honolulu, Hawaii, Obama is a graduate of Columbia University and Harvard Law School, where he served as president of the Harvard Law Review.

wojtuch commented 8 years ago

Maybe your Boxer installation is not properly referenced in the properties file then?

If it is, check if the tools alone work. Create a file with the sentence, then pass it to the candc executable and then pass the resulting file to the boxer executable.

$ <candc bin path> --models <candc models> --input <your file with sentence> --output <candc output file>

and then

$ <boxer bin path> --input <candc output file> --output <boxer output file>

if both candc and boxer are configured properly on your machine, <boxer output file> should contain the parsed sentence as XML.

WilliamsRizzi commented 8 years ago

I rechecked following your suggestion the boxer and CandC executables manually inserting the working tests of the CandC website: http://svn.ask.it.usyd.edu.au/trac/candc/wiki/BoxerSimple

and the output was still empty.

I noticed that they use the “—candc-printer boxer” flag

The interesting thing is that adding this flag in command line with your example sentence worked.

Then I added this same flag into the prepareCandCcall function:

and the output is not empty anymore. But it still gives me the parse exception:

/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/bin/java -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 15.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/tools.jar:/Users/myLaptop/Desktop/boxer2java-master/target/classes:/Users/myLaptop/.m2/repository/org/simpleframework/simple-xml/2.7.1/simple-xml-2.7.1.jar:/Users/myLaptop/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar:/Users/myLaptop/.m2/repository/stax/stax/1.2.0/stax-1.2.0.jar:/Users/myLaptop/.m2/repository/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar:/Applications/IntelliJ IDEA 15.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain com.github.wojtuch.boxer2java.Examples
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xdrs-output SYSTEM "src/data/boxer/xdrs.dtd"><xdrs-output version="'boxer v2606 (macosx build on 23 February 2016, 13:56:14)'"><!-- Barack Hussein Obama II is the 44th and current President of the United States, and the first African American to hold the office. Born in Honolulu, Hawaii, Obama is a graduate of Columbia University and Harvard Law School, where he served as president of the Harvard Law Review. --> <xdrs xml:id="xdrs1"> <taggedtokens>  <tagtoken xml:id="i1001">   <tags>     <tag type="tok">'Barack'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Barack'</tag>     <tag type="namex">'I-PER'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1002">   <tags>     <tag type="tok">'Hussein'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Hussein'</tag>     <tag type="namex">'I-PER'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1003">   <tags>     <tag type="tok">'Obama'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Obama'</tag>     <tag type="namex">'I-PER'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1004">   <tags>     <tag type="tok">'II'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'II'</tag>     <tag type="namex">'I-PER'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1005">   <tags>     <tag type="tok">is</tag>     <tag type="pos">'VBZ'</tag>     <tag type="lemma">be</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1006">   <tags>     <tag type="tok">the</tag>     <tag type="pos">'DT'</tag>     <tag type="lemma">the</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1007">   <tags>     <tag type="tok">'44th'</tag>     <tag type="pos">'NN'</tag>     <tag type="lemma">'44th'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1008">   <tags>     <tag type="tok">and</tag>     <tag type="pos">'CC'</tag>     <tag type="lemma">and</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1009">   <tags>     <tag type="tok">current</tag>     <tag type="pos">'JJ'</tag>     <tag type="lemma">current</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1010">   <tags>     <tag type="tok">'President'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'President'</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1011">   <tags>     <tag type="tok">of</tag>     <tag type="pos">'IN'</tag>     <tag type="lemma">of</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1012">   <tags>     <tag type="tok">the</tag>     <tag type="pos">'DT'</tag>     <tag type="lemma">the</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1013">   <tags>     <tag type="tok">'United'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'United'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1014">   <tags>     <tag type="tok">'States,'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'States,'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1015">   <tags>     <tag type="tok">and</tag>     <tag type="pos">'CC'</tag>     <tag type="lemma">and</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1016">   <tags>     <tag type="tok">the</tag>     <tag type="pos">'DT'</tag>     <tag type="lemma">the</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1017">   <tags>     <tag type="tok">first</tag>     <tag type="pos">'JJ'</tag>     <tag type="lemma">first</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1018">   <tags>     <tag type="tok">'African'</tag>     <tag type="pos">'JJ'</tag>     <tag type="lemma">african</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1019">   <tags>     <tag type="tok">'American'</tag>     <tag type="pos">'JJ'</tag>     <tag type="lemma">american</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1020">   <tags>     <tag type="tok">to</tag>     <tag type="pos">'TO'</tag>     <tag type="lemma">to</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1021">   <tags>     <tag type="tok">hold</tag>     <tag type="pos">'VB'</tag>     <tag type="lemma">hold</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1022">   <tags>     <tag type="tok">the</tag>     <tag type="pos">'DT'</tag>     <tag type="lemma">the</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1023">   <tags>     <tag type="tok">'office.'</tag>     <tag type="pos">'NN'</tag>     <tag type="lemma">'office.'</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1024">   <tags>     <tag type="tok">'Born'</tag>     <tag type="pos">'VBN'</tag>     <tag type="lemma">'Bear'</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1025">   <tags>     <tag type="tok">in</tag>     <tag type="pos">'IN'</tag>     <tag type="lemma">in</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1026">   <tags>     <tag type="tok">'Honolulu,'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Honolulu,'</tag>     <tag type="namex">'I-LOC'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1027">   <tags>     <tag type="tok">'Hawaii,'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Hawaii,'</tag>     <tag type="namex">'I-LOC'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1028">   <tags>     <tag type="tok">'Obama'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Obama'</tag>     <tag type="namex">'I-LOC'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1029">   <tags>     <tag type="tok">is</tag>     <tag type="pos">'VBZ'</tag>     <tag type="lemma">be</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1030">   <tags>     <tag type="tok">a</tag>     <tag type="pos">'DT'</tag>     <tag type="lemma">a</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1031">   <tags>     <tag type="tok">graduate</tag>     <tag type="pos">'NN'</tag>     <tag type="lemma">graduate</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1032">   <tags>     <tag type="tok">of</tag>     <tag type="pos">'IN'</tag>     <tag type="lemma">of</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1033">   <tags>     <tag type="tok">'Columbia'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Columbia'</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1034">   <tags>     <tag type="tok">'University'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'University'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1035">   <tags>     <tag type="tok">and</tag>     <tag type="pos">'CC'</tag>     <tag type="lemma">and</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1036">   <tags>     <tag type="tok">'Harvard'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Harvard'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1037">   <tags>     <tag type="tok">'Law'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Law'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1038">   <tags>     <tag type="tok">'School,'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'School,'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1039">   <tags>     <tag type="tok">where</tag>     <tag type="pos">'WRB'</tag>     <tag type="lemma">where</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1040">   <tags>     <tag type="tok">he</tag>     <tag type="pos">'PRP'</tag>     <tag type="lemma">he</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1041">   <tags>     <tag type="tok">served</tag>     <tag type="pos">'VBD'</tag>     <tag type="lemma">serve</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1042">   <tags>     <tag type="tok">as</tag>     <tag type="pos">'IN'</tag>     <tag type="lemma">as</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1043">   <tags>     <tag type="tok">president</tag>     <tag type="pos">'NN'</tag>     <tag type="lemma">president</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1044">   <tags>     <tag type="tok">of</tag>     <tag type="pos">'IN'</tag>     <tag type="lemma">of</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1045">   <tags>     <tag type="tok">the</tag>     <tag type="pos">'DT'</tag>     <tag type="lemma">the</tag>     <tag type="namex">'O'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1046">   <tags>     <tag type="tok">'Harvard'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Harvard'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1047">   <tags>     <tag type="tok">'Law'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Law'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken>  <tagtoken xml:id="i1048">   <tags>     <tag type="tok">'Review.'</tag>     <tag type="pos">'NNP'</tag>     <tag type="lemma">'Review.'</tag>     <tag type="namex">'I-ORG'</tag>   </tags>  </tagtoken> </taggedtokens> <merge>  <drs type="normal" label="l">   <domain>    <dr label="[]" name="_G6247">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6256">    <indexlist>    </indexlist>    </dr>    <dr label="[1045]" name="_G6265">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6274">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6283">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6292">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6301">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6310">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6319">    <indexlist>    </indexlist>    </dr>    <dr label="[1022]" name="_G6328">    <indexlist>    </indexlist>    </dr>    <dr label="[1006]" name="_G6337">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6346">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6355">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6364">    <indexlist>    </indexlist>    </dr>    <dr label="[1020]" name="_G6373">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6382">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6391">    <indexlist>    </indexlist>    </dr>    <dr label="[1016]" name="_G6400">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6409">    <indexlist>    </indexlist>    </dr>    <dr label="[1012]" name="_G6418">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6427">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6436">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6445">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6454">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6463">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G6472">    <indexlist>    </indexlist>    </dr>   </domain>   <conds>    <cond label="l">     <named arg="[]:_G6265" symbol="review." class="org" type="nam">     <indexlist>     <index pos="48">i1048</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6265" arg2="[]:_G6247">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6247" symbol="law" class="org" type="nam">     <indexlist>     <index pos="47">i1047</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6265" arg2="[]:_G6256">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6256" symbol="harvard" class="org" type="nam">     <indexlist>     <index pos="46">i1046</index>     </indexlist>     </named>    </cond>    <cond label="l">     <pred arg="[]:_G6274" symbol="male" type="n" sense="2">     <indexlist>     <index pos="40">i1040</index>     </indexlist>     </pred>    </cond>    <cond label="l">     <named arg="[]:_G6301" symbol="school," class="org" type="nam">     <indexlist>     <index pos="38">i1038</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6301" arg2="[]:_G6283">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6283" symbol="law" class="org" type="nam">     <indexlist>     <index pos="37">i1037</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6301" arg2="[]:_G6292">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6292" symbol="harvard" class="org" type="nam">     <indexlist>     <index pos="36">i1036</index>     </indexlist>     </named>    </cond>    <cond label="l">     <named arg="[]:_G6319" symbol="university" class="org" type="nam">     <indexlist>     <index pos="34">i1034</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6319" arg2="[]:_G6310">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6310" symbol="columbia" class="nam" type="nam">     <indexlist>     <index pos="33">i1033</index>     </indexlist>     </named>    </cond>    <cond label="l">     <named arg="[]:_G6364" symbol="obama" class="geo" type="nam">     <indexlist>     <index pos="28">i1028</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6364" arg2="[]:_G6346">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6346" symbol="hawaii," class="geo" type="nam">     <indexlist>     <index pos="27">i1027</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6364" arg2="[]:_G6355">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6355" symbol="honolulu," class="geo" type="nam">     <indexlist>     <index pos="26">i1026</index>     </indexlist>     </named>    </cond>    <cond label="l">     <rel arg1="[]:_G6400" arg2="[]:_G6373" symbol="Topic" sense="0">     <indexlist>     </indexlist>     </rel>    </cond>    <cond label="l">     <prop argument="[]:_G6373">     <indexlist>     </indexlist>      <drs type="normal" label="l">       <domain>        <dr label="[]" name="_G7606">        <indexlist>        </indexlist>        </dr>       </domain>       <conds>        <cond label="l">         <rel arg1="[]:_G7606" arg2="[]:_G6328" symbol="Theme" sense="0">         <indexlist>         </indexlist>         </rel>        </cond>        <cond label="l">         <rel arg1="[]:_G7606" arg2="[]:_G6400" symbol="Actor" sense="0">         <indexlist>         </indexlist>         </rel>        </cond>        <cond label="l">         <pred arg="[]:_G7606" symbol="hold" type="v" sense="0">         <indexlist>         <index pos="21">i1021</index>         </indexlist>         </pred>        </cond>       </conds>      </drs>     </prop>    </cond>    <cond label="l">     <pred arg="[]:_G6328" symbol="office." type="n" sense="0">     <indexlist>     <index pos="23">i1023</index>     </indexlist>     </pred>    </cond>    <cond label="l">     <pred arg="[]:_G6400" symbol="american" type="n" sense="0">     <indexlist>     <index pos="19">i1019</index>     </indexlist>     </pred>    </cond>    <cond label="l">     <pred arg="[]:_G6382" symbol="african" type="a" sense="0">     <indexlist>     <index pos="18">i1018</index>     </indexlist>     </pred>    </cond>    <cond label="l">     <rel arg1="[]:_G6382" arg2="[]:_G6400" symbol="Theme" sense="0">     <indexlist>     </indexlist>     </rel>    </cond>    <cond label="l">     <pred arg="[]:_G6391" symbol="first" type="a" sense="0">     <indexlist>     <index pos="17">i1017</index>     </indexlist>     </pred>    </cond>    <cond label="l">     <rel arg1="[]:_G6391" arg2="[]:_G6400" symbol="Theme" sense="0">     <indexlist>     </indexlist>     </rel>    </cond>    <cond label="l">     <named arg="[]:_G6418" symbol="states," class="org" type="nam">     <indexlist>     <index pos="14">i1014</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6418" arg2="[]:_G6409">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6409" symbol="united" class="org" type="nam">     <indexlist>     <index pos="13">i1013</index>     </indexlist>     </named>    </cond>    <cond label="l">     <named arg="[]:_G6436" symbol="president" class="nam" type="nam">     <indexlist>     <index pos="10">i1010</index>     </indexlist>     </named>    </cond>    <cond label="l">     <pred arg="[]:_G6427" symbol="current" type="a" sense="0">     <indexlist>     <index pos="9">i1009</index>     </indexlist>     </pred>    </cond>    <cond label="l">     <rel arg1="[]:_G6427" arg2="[]:_G6436" symbol="Theme" sense="0">     <indexlist>     </indexlist>     </rel>    </cond>    <cond label="l">     <pred arg="[]:_G6337" symbol="44th" type="n" sense="0">     <indexlist>     <index pos="7">i1007</index>     </indexlist>     </pred>    </cond>    <cond label="l">     <named arg="[]:_G6472" symbol="ii" class="per" type="nam">     <indexlist>     <index pos="4">i1004</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6472" arg2="[]:_G6445">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6445" symbol="obama" class="per" type="nam">     <indexlist>     <index pos="3">i1003</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6472" arg2="[]:_G6454">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6454" symbol="hussein" class="per" type="nam">     <indexlist>     <index pos="2">i1002</index>     </indexlist>     </named>    </cond>    <cond label="l">     <eq arg1="[]:_G6472" arg2="[]:_G6463">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <named arg="[]:_G6463" symbol="barack" class="per" type="nam">     <indexlist>     <index pos="1">i1001</index>     </indexlist>     </named>    </cond>   </conds>  </drs>  <drs type="normal" label="l">   <domain>    <dr label="[]" name="_G9001">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G9010">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G9019">    <indexlist>    </indexlist>    </dr>    <dr label="[1015]" name="_G9028">    <indexlist>    </indexlist>    </dr>    <dr label="[]" name="_G9037">    <indexlist>    </indexlist>    </dr>   </domain>   <conds>    <cond label="l">     <prop argument="[]:_G9001">     <indexlist>     </indexlist>      <drs type="normal" label="l">       <domain>        <dr label="[]" name="_G9073">        <indexlist>        </indexlist>        </dr>        <dr label="[1035]" name="_G9082">        <indexlist>        </indexlist>        </dr>        <dr label="[1030]" name="_G9091">        <indexlist>        </indexlist>        </dr>       </domain>       <conds>        <cond label="l">         <eq arg1="[]:_G6436" arg2="[]:_G9091">         <indexlist>         <index pos="29">i1029</index>         </indexlist>         </eq>        </cond>        <cond label="l">         <rel arg1="[]:_G9091" arg2="[]:_G9082" symbol="of" sense="0">         <indexlist>         <index pos="32">i1032</index>         </indexlist>         </rel>        </cond>        <cond label="l">         <prop argument="[]:_G9073">         <indexlist>         </indexlist>          <drs type="normal" label="l">           <domain>            <dr label="[]" name="_G9205">            <indexlist>            </indexlist>            </dr>            <dr label="[]" name="_G9214">            <indexlist>            </indexlist>            </dr>           </domain>           <conds>            <cond label="l">             <rel arg1="[]:_G9214" arg2="[]:_G9205" symbol="as" sense="0">             <indexlist>             <index pos="42">i1042</index>             </indexlist>             </rel>            </cond>            <cond label="l">             <rel arg1="[]:_G9205" arg2="[]:_G6265" symbol="of" sense="0">             <indexlist>             <index pos="44">i1044</index>             </indexlist>             </rel>            </cond>            <cond label="l">             <pred arg="[]:_G9205" symbol="president" type="n" sense="0">             <indexlist>             <index pos="43">i1043</index>             </indexlist>             </pred>            </cond>            <cond label="l">             <rel arg1="[]:_G9214" arg2="[]:_G6274" symbol="Actor" sense="0">             <indexlist>             </indexlist>             </rel>            </cond>            <cond label="l">             <pred arg="[]:_G9214" symbol="serve" type="v" sense="0">             <indexlist>             <index pos="41">i1041</index>             </indexlist>             </pred>            </cond>           </conds>          </drs>         </prop>        </cond>        <cond label="l">         <rel arg1="[]:_G9082" arg2="[]:_G9073" symbol="where" sense="0">         <indexlist>         <index pos="39">i1039</index>         </indexlist>         </rel>        </cond>        <cond label="l">         <rel arg1="[]:_G6301" arg2="[]:_G9082" symbol="subset_of" sense="1">         <indexlist>         </indexlist>         </rel>        </cond>        <cond label="l">         <rel arg1="[]:_G6319" arg2="[]:_G9082" symbol="subset_of" sense="1">         <indexlist>         </indexlist>         </rel>        </cond>        <cond label="l">         <pred arg="[]:_G9091" symbol="graduate" type="n" sense="0">         <indexlist>         <index pos="31">i1031</index>         </indexlist>         </pred>        </cond>       </conds>      </drs>     </prop>    </cond>    <cond label="l">     <rel arg1="[]:_G6436" arg2="[]:_G9028" symbol="of" sense="0">     <indexlist>     <index pos="11">i1011</index>     </indexlist>     </rel>    </cond>    <cond label="l">     <rel arg1="[]:_G6400" arg2="[]:_G9028" symbol="subset_of" sense="1">     <indexlist>     </indexlist>     </rel>    </cond>    <cond label="l">     <rel arg1="[]:_G9010" arg2="[]:_G6364" symbol="in" sense="0">     <indexlist>     <index pos="25">i1025</index>     </indexlist>     </rel>    </cond>    <cond label="l">     <rel arg1="[]:_G9010" arg2="[]:_G9019" symbol="Theme" sense="0">     <indexlist>     </indexlist>     </rel>    </cond>    <cond label="l">     <pred arg="[]:_G9010" symbol="bear" type="v" sense="0">     <indexlist>     <index pos="24">i1024</index>     </indexlist>     </pred>    </cond>    <cond label="l">     <eq arg1="[]:_G6400" arg2="[]:_G9019">     <indexlist>     </indexlist>     </eq>    </cond>    <cond label="l">     <rel arg1="[]:_G6418" arg2="[]:_G9028" symbol="subset_of" sense="1">     <indexlist>     </indexlist>     </rel>    </cond>    <cond label="l">     <prop argument="[]:_G9037">     <indexlist>     </indexlist>      <drs type="normal" label="l">       <domain>       </domain>       <conds>        <cond label="l">         <eq arg1="[]:_G6472" arg2="[]:_G6337">         <indexlist>         <index pos="5">i1005</index>         </indexlist>         </eq>        </cond>       </conds>      </drs>     </prop>    </cond>   </conds>  </drs> </merge></xdrs></xdrs-output>
Exception in thread "main" org.simpleframework.xml.core.ElementException: Element 'taggedtokens' does not have a match in class com.github.wojtuch.boxer2java.models.Xdrs at line 1
    at org.simpleframework.xml.core.Composite.readElement(Composite.java:527)
    at org.simpleframework.xml.core.Composite.readElements(Composite.java:445)
    at org.simpleframework.xml.core.Composite.access$400(Composite.java:59)
    at org.simpleframework.xml.core.Composite$Builder.read(Composite.java:1383)
    at org.simpleframework.xml.core.Composite.read(Composite.java:201)
    at org.simpleframework.xml.core.Composite.read(Composite.java:148)
    at org.simpleframework.xml.core.Traverser.read(Traverser.java:92)
    at org.simpleframework.xml.core.CompositeInlineList.read(CompositeInlineList.java:190)
    at org.simpleframework.xml.core.CompositeInlineList.read(CompositeInlineList.java:167)
    at org.simpleframework.xml.core.CompositeInlineList.read(CompositeInlineList.java:124)
    at org.simpleframework.xml.core.Composite.readVariable(Composite.java:623)
    at org.simpleframework.xml.core.Composite.readInstance(Composite.java:573)
    at org.simpleframework.xml.core.Composite.readUnion(Composite.java:549)
    at org.simpleframework.xml.core.Composite.readElement(Composite.java:532)
    at org.simpleframework.xml.core.Composite.readElements(Composite.java:445)
    at org.simpleframework.xml.core.Composite.access$400(Composite.java:59)
    at org.simpleframework.xml.core.Composite$Builder.read(Composite.java:1383)
    at org.simpleframework.xml.core.Composite.read(Composite.java:201)
    at org.simpleframework.xml.core.Composite.read(Composite.java:148)
    at org.simpleframework.xml.core.Traverser.read(Traverser.java:92)
    at org.simpleframework.xml.core.Persister.read(Persister.java:625)
    at org.simpleframework.xml.core.Persister.read(Persister.java:606)
    at org.simpleframework.xml.core.Persister.read(Persister.java:584)
    at org.simpleframework.xml.core.Persister.read(Persister.java:562)
    at org.simpleframework.xml.core.Persister.read(Persister.java:499)
    at org.simpleframework.xml.core.Persister.read(Persister.java:408)
    at com.github.wojtuch.boxer2java.Boxer2Java.fromString(Boxer2Java.java:29)
    at com.github.wojtuch.boxer2java.Examples.main(Examples.java:21)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Process finished with exit code 1

From this I infer that the Boxer output is not empty anymore, but still I have this strange parser error.

Thank you in advance for your help.

On 14 Apr 2016, at 11:44, Wojciech Łukasiewicz notifications@github.com wrote:

Maybe your Boxer installation is not properly referenced in the properties file then?

If it is, check if the tools alone work. Create a file with the sentence, then pass it to the candc executable and then pass the resulting file to the boxer executable.

--models --input --output and then --input --output if both candc and boxer are configured properly on your machine, should contain the parsed sentence as XML. — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/wojtuch/boxer2java/issues/1#issuecomment-209853695