brendano / ark-tweet-nlp

CMU ARK Twitter Part-of-Speech Tagger
http://www.ark.cs.cmu.edu/TweetNLP/
Other
575 stars 199 forks source link

Cannot build properly #28

Open bugr opened 9 years ago

bugr commented 9 years ago

I followed these steps to build the project and run the example for tagging:

git clone https://github.com/brendano/ark-tweet-nlp.git
cd ark-tweet-nlp/
mvn clean package
cp ark-tweet-nlp/target/original-ark-tweet-nlp-0.3.2.jar .
mv original-ark-tweet-nlp-0.3.2.jar ark-tweet-nlp-0.3.2.jar
./runTagger.sh examples/example_tweets.txt

I am getting the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonParseException
    at cmu.arktweetnlp.impl.Model.loadModelFromText(Model.java:409)
    at cmu.arktweetnlp.Tagger.loadModel(Tagger.java:40)
    at cmu.arktweetnlp.RunTagger.runTagger(RunTagger.java:85)
    at cmu.arktweetnlp.RunTagger.main(RunTagger.java:373)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonParseException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 4 more

Any ideas?

cpsievert commented 9 years ago

+1, I get the same error

mafuchi commented 8 years ago

I had this issue too, you have to add a trained module (since there are several) to the source, once you do it built properly for me. This is in the hacking.txt file:

Resources

The checkout should have all necessary resources EXCEPT a trained model. One can be downloaded from http://www.ark.cs.cmu.edu/TweetNLP (it is packaged with the released version). Put it into this directory: ark-tweet-nlp/src/main/resources/cmu/arktweetnlp/

... then when you type "mvn package", it will be put into the jar file as a loadable resource. (All resources should go in this directory; the source checkout includes word clusters and others.)