coli-saar / am-parser

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

Java exception when decomposing AMRs to AM-CoNLL, for re-training the parser #92

Closed ablodge closed 3 years ago

ablodge commented 3 years ago

Hello. I am attempting to re-train the parser following the instructions here. When I get to the step described here which is meant to produce an AM-CoNLL file, I get the following output:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
0
Downloading the folder from datastore . . . 
        GroupId: readonly.org.cogcomp.gazetteers
        ArtifactId: 1.6/gazetteers.zip
The target /Users/austinblodgett/.cogcomp-datastore/readonly.org.cogcomp.gazetteers/1.6/gazetteers already exists. Skipping download from the datastore . . . 
java.io.FileNotFoundException: /Users/austinblodgett/.cogcomp-datastore/readonly.org.cogcomp.gazetteers/1.6/gazetteers/gazetteers/gazetteers-list.txt (No such file or directory)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:211)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:153)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:108)
    at edu.illinois.cs.cogcomp.ner.ExpressiveFeatures.TreeGazetteers.init(TreeGazetteers.java:72)
    at edu.illinois.cs.cogcomp.ner.ExpressiveFeatures.TreeGazetteers.<init>(TreeGazetteers.java:50)
    at edu.illinois.cs.cogcomp.ner.ExpressiveFeatures.GazetteersFactory.get(GazetteersFactory.java:50)
    at edu.illinois.cs.cogcomp.ner.LbjTagger.Parameters.readAndLoadConfig(Parameters.java:265)
    at edu.illinois.cs.cogcomp.ner.LbjTagger.Parameters.readConfigAndLoadExternalData(Parameters.java:56)
    at edu.illinois.cs.cogcomp.ner.NERAnnotator.initialize(NERAnnotator.java:109)
    at edu.illinois.cs.cogcomp.annotation.Annotator.doInitialize(Annotator.java:126)
    at edu.illinois.cs.cogcomp.annotation.Annotator.lazyAddView(Annotator.java:201)
    at edu.illinois.cs.cogcomp.annotation.Annotator.getView(Annotator.java:167)
    at de.saar.coli.amrtagging.formalisms.amr.tools.preproc.UiucNamedEntityRecognizer.tag(UiucNamedEntityRecognizer.java:62)
    at de.saar.coli.amrtagging.formalisms.amr.tools.ToAMConll.main(ToAMConll.java:209)
Downloading the folder from datastore . . . 
        GroupId: readonly.edu.illinois.cs.cogcomp.ner
        ArtifactId: 4.0/ner-model-enron-conll-all-data.zip
The target /Users/austinblodgett/.cogcomp-datastore/readonly.edu.illinois.cs.cogcomp.ner/4.0/ner-model-enron-conll-all-data already exists. Skipping download from the datastore . . . 
Exception in thread "main" java.lang.IllegalArgumentException: View NER_CONLL not found
    at edu.illinois.cs.cogcomp.core.datastructures.textannotation.AbstractTextAnnotation.getView(AbstractTextAnnotation.java:134)
    at edu.illinois.cs.cogcomp.annotation.Annotator.getView(Annotator.java:168)
    at de.saar.coli.amrtagging.formalisms.amr.tools.preproc.UiucNamedEntityRecognizer.tag(UiucNamedEntityRecognizer.java:62)
    at de.saar.coli.amrtagging.formalisms.amr.tools.ToAMConll.main(ToAMConll.java:209)

I'm having a difficult time interpreting this issue, but it looks like there is some local resource that is missing on my machine. Do you have any suggestions about how to fix this?

jgroschwitz commented 3 years ago

Hi Austin, this issue is new to me so I'm not exactly sure what's going on. But it looks like a problem with the CogComp NER system, and looks similar to this issue: https://github.com/CogComp/cogcomp-nlp/issues/506. Does this help?

If the problem persists, @namednil could you have a look too? I'm not too familiar with that section of the code.

namednil commented 3 years ago

Hi Austin! Do you want to exactly reproduce our results at the 2019 MRP shared task? We had to use the UIUC named entity recognizer because our usual choice (Stanford CoreNLP) wasn't on the white list of admissible resources (but CoreNLP works a bit better, if I recall correctly).

If you don't need the exact same setting, you can activate the CoreNLP named entity tagger by supplying --stanford-ner-model downloaded_models/stanford/english.conll.4class.distsim.crf.ser.gz as an argument. This file should have been downloaded by the setup_AMR.sh script: https://github.com/coli-saar/am-parser/blob/5f821c752adae9df6225abcc3f442b04d71dfca7/scripts/setup_AMR.sh#L31

ablodge commented 3 years ago

Thank you! That solved the problem I had.