coli-saar / am-parser

Modular implementation of an AM dependency parser in AllenNLP.
Apache License 2.0
30 stars 10 forks source link

setSupertag sometimes fails in UCCA decomposition #73

Open namednil opened 5 years ago

namednil commented 5 years ago

We noticed that setSupertag sometimes fails. This affects only 30 sentences in the training corpus that could be decomposed otherwise. Let's not care right now.

Example (with some dramatic irony):

id 290594-0005
It's unfortunate that bmil believed that his 'perfect' dog was not given the right opportunity to prove himself.
java.lang.NullPointerException
    at de.saar.coli.amrtagging.AmConllEntry.setSupertag(AmConllEntry.java:81)
    at de.saar.coli.amrtagging.AmConllSentence.fromIndexedAMTerm(AmConllSentence.java:139)
    at de.saar.coli.amrtagging.formalisms.ucca.tools.CreateCorpusParallel.lambda$main$4(CreateCorpusParallel.java:224)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
    at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
    at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
    at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
    at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583)
    at de.saar.coli.amrtagging.formalisms.ucca.tools.CreateCorpusParallel.main(CreateCorpusParallel.java:159)

This was the input

###IRTG unannotated corpus file, v1.0
###
### can add comment here
###interpretation id: de.up.ling.irtg.algebra.StringAlgebra
###interpretation flavor: de.up.ling.irtg.algebra.StringAlgebra
###interpretation framework: de.up.ling.irtg.algebra.StringAlgebra
###interpretation version: de.up.ling.irtg.algebra.StringAlgebra
###interpretation time: de.up.ling.irtg.algebra.StringAlgebra
###interpretation spans: de.up.ling.irtg.algebra.StringAlgebra
###interpretation input: de.up.ling.irtg.algebra.StringAlgebra
###interpretation string: de.up.ling.irtg.algebra.StringAlgebra
###interpretation alignment: de.up.ling.irtg.algebra.StringAlgebra
###interpretation graph: de.up.ling.irtg.algebra.graph.GraphAlgebra

290594-0005
1
ucca
0.9
2019-05-18 (06:33)
0:2 2:4 5:16 17:21 22:26 27:35 36:40 41:44 45:53 53:54 55:58 59:62 63:66 67:72 73:76 77:82 83:94 95:97 98:103 104:111 111:112
It's unfortunate that bmil believed that his 'perfect' dog was not given the right opportunity to prove himself.
it 's unfortunate that bmil believed that his 'perfect ' dog was not given the right opportunity to prove himself .
13!||13||1.0 8!||10||1.0 25|9!||9||1.0 23|5!||6||1.0 7!||8||1.0 10!||10||1.0 12!||12||1.0 3!||4||1.0 28|19!||19||1.0 4!||5||1.0 18!||18||1.0 6!||4||1.0 24|14!||14||1.0 20!||0||1.0 22|2!||3||1.0 1!||2||1.0 0!||1||1.0 17!||17||1.0 15!||15||1.0 16!||16||1.0 11!||11||1.0 
[24/Non-Terminal -D-> 13/not; 24 -U-> 8/'; 25/Non-Terminal -S-> 9/perfect; 23/Non-Terminal -S-> 5/believed; 24 -A-> 7/his; 25 -U-> 10/'; 24 -F-> 12/was; 23 -R-> 3/that; 28/Non-Terminal -P-> 19/prove himself; 23 -A-> 4/bmil; 28 -F-> 18/to; 23 -A-> 24; 24 -R-> 6/that; 24 -A-> 28; 24 -P-> 14/given; 28 -U-> 20/.; 22<root>/Non-Terminal -A-> 23; 22<root> -S-> 2/unfortunate; 22<root> -F-> 1/'s; 22<root> -F-> 0/it; 28 -A-> 17/opportunity; 17/opportunity -F-> 15/the; 17 -E-> 16/right; 24 -A-> 11/dog; 11/dog -E-> 25]