clir / clearnlp-guidelines

Guidelines.
96 stars 37 forks source link

Cannot run the constituency-to-dependency program #11

Closed allanj closed 8 years ago

allanj commented 8 years ago
  1. I directly install on maven.
  2. Then I directly run C2DConvert.main(args);
  3. where the args are exactly same as your example.

Error:

java.lang.IllegalArgumentException: InputStream cannot be null
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:117)
    at edu.emory.clir.clearnlp.util.XmlUtils.getDocumentElement(XmlUtils.java:173)
    at edu.emory.clir.clearnlp.component.mode.morph.EnglishMPAnalyzer.<init>(EnglishMPAnalyzer.java:73)
    at edu.emory.clir.clearnlp.component.utils.NLPUtils.getMPAnalyzer(NLPUtils.java:79)
    at edu.emory.clir.clearnlp.bin.C2DConvert.<init>(C2DConvert.java:82)
    at edu.emory.clir.clearnlp.bin.C2DConvert.main(C2DConvert.java:264)
    at data.preprocess.Test.main(Test.java:13)
java.lang.IllegalArgumentException: InputStream cannot be null
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:117)
    at edu.emory.clir.clearnlp.util.XmlUtils.getDocumentElement(XmlUtils.java:173)
    at edu.emory.clir.clearnlp.component.mode.morph.EnglishMPAnalyzer.<init>(EnglishMPAnalyzer.java:74)
    at edu.emory.clir.clearnlp.component.utils.NLPUtils.getMPAnalyzer(NLPUtils.java:79)
    at edu.emory.clir.clearnlp.bin.C2DConvert.<init>(C2DConvert.java:82)
    at edu.emory.clir.clearnlp.bin.C2DConvert.main(C2DConvert.java:264)
    at data.preprocess.Test.main(Test.java:13)
java.lang.NullPointerException
    at edu.emory.clir.clearnlp.util.XmlUtils.getFirstElementByTagName(XmlUtils.java:75)
    at edu.emory.clir.clearnlp.component.mode.morph.EnglishMPAnalyzer.getInflectionRules(EnglishMPAnalyzer.java:141)
    at edu.emory.clir.clearnlp.component.mode.morph.EnglishMPAnalyzer.<init>(EnglishMPAnalyzer.java:78)
    at edu.emory.clir.clearnlp.component.utils.NLPUtils.getMPAnalyzer(NLPUtils.java:79)
    at edu.emory.clir.clearnlp.bin.C2DConvert.<init>(C2DConvert.java:82)
    at edu.emory.clir.clearnlp.bin.C2DConvert.main(C2DConvert.java:264)
    at data.preprocess.Test.main(Test.java:13)
allanj commented 8 years ago

I check the following class file as well, seems like the maven package doesn't have these files included?

public interface PathEnglishMPAnalyzer
{
    String ROOT = "edu/emory/clir/clearnlp/dictionary/morphology/english/";

    String INFLECTION_SUFFIX = ROOT + "inflection_suffix.xml";
    String DERIVATION_SUFFIX = ROOT + "derivation_suffix.xml";
    String ABBREVIATOIN_RULE = ROOT + "abbreviation.rule";
    String CARDINAL_BASE     = ROOT + "cardinal.base";
    String ORDINAL_BASE      = ROOT + "ordinal.base";

    String VERB          = "verb";
    String NOUN          = "noun";
    String ADJECTIVE     = "adjective";
    String ADVERB        = "adverb";
    String EXT_BASE      = ".base";
    String EXT_EXCEPTION = ".exc";
}
allanj commented 8 years ago

OK, after many trials.

I found out that I can add one more dependency to pom.xml to fix that.

<dependency>
        <groupId>edu.emory.clir</groupId>
        <artifactId>clearnlp-dictionary</artifactId>
        <version>3.2</version>
</dependency>

BTW, it will be good that you can add this to the constituency-to-dependency README. Otherwise, I guess others will have the same problem while using this.

jdchoi77 commented 8 years ago

The clearnlp project has been moved to a new project called NLP4J:

https://github.com/emorynlp/nlp4j/

Thanks.

allanj commented 8 years ago

Seems this one does not contain the conversion from constituency to dependency tool

On Tue, Sep 6, 2016 at 11:51 PM, Jinho D. Choi notifications@github.com wrote:

The clearnlp project has been moved to a new project called NLP4J:

https://github.com/emorynlp/nlp4j/

Thanks.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/clir/clearnlp-guidelines/issues/11#issuecomment-244996377, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMik3_vhw-HOt-DTCxGRSCJoEi2JC8oks5qnYv3gaJpZM4Jz-G9 .

Ph.D. student, StatNLP Group http://www.statnlp.org/, Information Systems and Technology Design https://istd.sutd.edu.sg/, Singapore University of Technology and Design http://www.sutd.edu.sg/, Singapore. Website: http://people.sutd.edu.sg/~allanjie/ http://people.sutd.edu.sg/~allanjie/

allanj commented 8 years ago

I mean the new project does not contain the constituency-to-dependency conversion tool

jdchoi77 commented 8 years ago

Sorry, I'm making a pretty big change in the dependency conversion package at the moment; I'll be pushing this by the end Sep so the new project will have it as well.

allanj commented 8 years ago

Great. Thanks for the information.

On Wed, Sep 7, 2016 at 10:37 PM, Jinho D. Choi notifications@github.com wrote:

Sorry, I'm making a pretty big change in the dependency conversion package at the moment; I'll be pushing this by the end Sep so the new project will have it as well.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/clir/clearnlp-guidelines/issues/11#issuecomment-245301261, or mute the thread https://github.com/notifications/unsubscribe-auth/ADMik-zQFRiMyTkbN-dRCMCPdR1BtE41ks5qnsxCgaJpZM4Jz-G9 .

Ph.D. student, StatNLP Group http://www.statnlp.org/, Information Systems and Technology Design https://istd.sutd.edu.sg/, Singapore University of Technology and Design http://www.sutd.edu.sg/, Singapore. Website: http://people.sutd.edu.sg/~allanjie/ http://people.sutd.edu.sg/~allanjie/