Closed krywykj closed 7 years ago
Hi Julien,
Thank you for your report and happy new year to you, too! Did you successfully compile the project and made sure that the generated jar file (or classes) are in the classpath of the java command in parse.sh?
Cheers, Michael
Hey, I didn't compile the project, that's the reason! I need a bit help to do it. I'm using use BlueJ to compile manually each class, and it fails because of some packages are missing (i2 from anna package, etu.illinois,...).
Cheers, Julien
Hi Julien,
The easiest way to compile the project is using maven. If you have maven installed, you just need to run "mvn compile" in the project's root directory and that will compile everything for you.
Re missing packages, i2.* should be part of anna-3.3.jar. Make sure you have "libs/anna-3.3.jar" added to your classpath. You don't need to compile the classes that refer to any of the illinois packages since these are not used by the project's main classes.
Cheers, Michael
Once in the PathLSTM folder, I compile with :
mvn compile
and I have the following error :
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:58 min
[INFO] Finished at: 2017-01-04T13:38:38+04:00
[INFO] Final Memory: 12M/174M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project PathLSTM: Could not resolve dependencies for project uk.ac.ed.inf:PathLSTM:jar:1.0.0: Could not find artifact edu.illinois.cs.cogcomp:illinois-depparse:jar:0.1.1 in CogCompSoftware (http://cogcomp.cs.illinois.edu/m2repo/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
As this package 'edu.illinois' is not use by the project main class, how could I fix it ?
many thx for your help!
Thank you for the error report! Can you edit the pom.xml file, remove the illinois-depparse dependency[1] and try to compile again?
[1] These lines need to be deleted: https://github.com/microth/PathLSTM/blob/master/pom.xml#L40-L44
I remove these line, mvn compile, and here is my new output :
[INFO] 21 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:13 min
[INFO] Finished at: 2017-01-04T14:14:09+04:00
[INFO] Final Memory: 25M/325M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project PathLSTM: Compilation failure: Compilation failure:
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[17,40] package edu.illinois.cs.cogcomp.depparse does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[18,40] package edu.illinois.cs.cogcomp.depparse does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[19,43] package edu.illinois.cs.cogcomp.depparse.io does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[21,47] package edu.illinois.cs.cogcomp.pipeline.common does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[22,45] package edu.illinois.cs.cogcomp.pipeline.main does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[45,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[46,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[47,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[48,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[49,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[50,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[51,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[52,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[53,65] package PipelineConfigurator does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[54,79] cannot find symbol
[ERROR] symbol: class PipelineConfigurator
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[57,33] cannot find symbol
[ERROR] symbol: variable PipelineFactory
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[67,17] cannot find symbol
[ERROR] symbol: variable CONLLReader
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[107,17] cannot find symbol
[ERROR] symbol: class DepInst
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[107,36] cannot find symbol
[ERROR] symbol: class DepInst
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[108,17] cannot find symbol
[ERROR] symbol: class DepStruct
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[110,35] cannot find symbol
[ERROR] symbol: class DepStruct
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I removed all references in the source code to the missing dependency. Can you download the code again and run mvn compile once more? Sorry for the inconvenience.
Thank you for your time, we help each other.
I download the code again, mvn compile, I have now :
[INFO] 8 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.684 s
[INFO] Finished at: 2017-01-04T14:30:59+04:00
[INFO] Final Memory: 21M/281M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project PathLSTM: Compilation failure: Compilation failure:
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[17,40] package edu.illinois.cs.cogcomp.depparse does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[18,40] package edu.illinois.cs.cogcomp.depparse does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[19,43] package edu.illinois.cs.cogcomp.depparse.io does not exist
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[63,17] cannot find symbol
[ERROR] symbol: variable CONLLReader
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[103,17] cannot find symbol
[ERROR] symbol: class DepInst
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[103,36] cannot find symbol
[ERROR] symbol: class DepInst
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[104,17] cannot find symbol
[ERROR] symbol: class DepStruct
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] /home/krywyk/Pro/LogiCells/R&D Semantique/PathLSTM/src/main/java/se/lth/cs/srl/preprocessor/IllinoisPreprocessor.java:[106,35] cannot find symbol
[ERROR] symbol: class DepStruct
[ERROR] location: class se.lth.cs.srl.preprocessor.IllinoisPreprocessor
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Okay, I removed those references to the missing depparse dependency as well. Please retry again. I hope we'll have this fixed soon. :)
INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.923 s
[INFO] Finished at: 2017-01-04T14:55:31+04:00
[INFO] Final Memory: 22M/350M
[INFO] ------------------------------------------------------------------------
Well done!
Now, how can I run the script ? Doing :
./scripts/parse.sh
gives the following error :
error could not find or load main class se.lth.cs.srl.CompletePipeline
try: "java -cp libs/anna-3.3.jar:target/PathLSTM-1.0.0.jar se.lth.cs.srl.CompletePipeline eng -lemma models/CoNLL2009-ST-English-ALL.anna-3.3.lemmatizer.model -tagger models/CoNLL2009-ST-English-ALL.anna-3.3.postagger.model -parser models/CoNLL2009-ST-English-ALL.anna-3.3.parser.model -srl models/srl-ACL2016-eng.model -tokenize -reranker -externalNNs -test INPUTFILE" (adapt filenames, if necessary)
I just try, there is the same error : error could not find or load main class se.lth.cs.srl.CompletePipeline
I notive that :
mvn compile
doesn't create a jar file.
My subdirectories lib/ and models/ are in the root directory : PathLSTM/
Replace "target/PathLSTM-1.0.0.jar" with "target/classes/" then? Or are there no compiled files in there either?
Exactly, I changed it and now :
java -cp "libs/anna-3.3.jar:target/classes" se.lth.cs.srl.CompletePipeline eng -lemma models/CoNLL2009-ST-English-ALL.anna-3.3.lemmatizer.model -tagger models/CoNLL2009-ST-English-ALL.anna-3.3.postagger.model -parser models/CoNLL2009-ST-English-ALL.anna-3.3.parser.model -srl models/srl-ACL2016-eng.model -tokenize -reranker -externalNNs -test
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 13
at se.lth.cs.srl.options.CompletePipelineCMDLineOptions.trySubParseArg(CompletePipelineCMDLineOptions.java:37)
at se.lth.cs.srl.options.FullPipelineOptions.parseCmdLineArgs(FullPipelineOptions.java:84)
at se.lth.cs.srl.CompletePipeline.main(CompletePipeline.java:112)
Looks like you forgot to specify an argument for the parameter -test. You should put a filename there, referring to a text file to parse with one sentence per line.
Yes, you're right. Now, the text file seems not being seen :
java -cp "libs/anna-3.3.jar:target/classes" se.lth.cs.srl.CompletePipeline eng -lemma models/CoNLL2009-ST-English-ALL.anna-3.3.lemmatizer.model -tagger models/CoNLL2009-ST-English-ALL.anna-3.3.postagger.model -parser models/CoNLL2009-ST-English-ALL.anna-3.3.parser.model -srl models/srl-ACL2016-eng.model -tokenize -reranker -externalNNs -test models/text_to_parse.txt
13.14.114 is2.data.ParametersFloat 121:read -> read parameters 134217727 not zero 296071
13.14.118 is2.data.Cluster 113:<init> -> Read cluster with 0 words
13.14.119 is2.lemmatizer.Lemmatizer 192:readModel -> Loading data finished.
13.14.119 is2.lemmatizer.Lemmatizer 194:readModel -> number of params 134217727
13.14.119 is2.lemmatizer.Lemmatizer 195:readModel -> number of classes 92
13.18.116 is2.data.ParametersFloat 121:read -> read parameters 134217727 not zero 1613201
13.18.116 is2.data.Cluster 113:<init> -> Read cluster with 0 words
13.18.117 is2.tag.Lexicon 103:<init> -> Read lexicon with 0 words
13.18.117 is2.tag.Tagger 141:readModel -> Loading data finished.
13.18.124 is2.parser.Parser 188:readModel -> Reading data started
13.18.146 is2.data.Cluster 113:<init> -> Read cluster with 0 words
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at is2.parser.ParametersFloat.read(ParametersFloat.java:93)
at is2.parser.Parser.readModel(Parser.java:199)
at is2.parser.Parser.<init>(Parser.java:71)
at is2.parser.Parser.<init>(Parser.java:83)
at se.lth.cs.srl.util.BohnetHelper.getParser(BohnetHelper.java:43)
at se.lth.cs.srl.languages.Language.getPreprocessor(Language.java:130)
at se.lth.cs.srl.CompletePipeline.getCompletePipeline(CompletePipeline.java:44)
at se.lth.cs.srl.CompletePipeline.main(CompletePipeline.java:122)
The error message suggests that the java virtual machine doesn't have enough memory. You can add a parameter "-Xmx40g" after "java" to increase the memory size for the process.
Hey Microth, it's seems to work, even if I stopped the process because my computer started to warm. I'll try tomorrow on a better computer. I'll keep you informed of possibles news issues. thank you for your help!
You are welcome! :)
Hello, Sorry, but i was trying to run the mateplus project and found the exception. I was able to run pathLSTM fine, but i wanted to see what is the difference between PathLSTM and Mateplus.
In mateplus, i am trying to run parse.sh file, as indicated in the readme when i got this exception. I am not sure if it is in an unrelated thread.
On Wed, Feb 22, 2017 at 11:54 AM, microth notifications@github.com wrote:
Please don't post the same issue multiple times. Don't post it in an unrelated thread.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microth/PathLSTM/issues/3#issuecomment-281783570, or mute the thread https://github.com/notifications/unsubscribe-auth/ARgoedI5FnnT8xLi1LSJzTjQXk-mv9F9ks5rfJJhgaJpZM4LZZG3 .
-- Thanks, Nandini Parimi
What do you mean by "the exception"?
Hi, I'm working on a Ubuntu 16:04.
I created the two subdirectories libs/ and models/, where I put the librairies and models. When I execute :
.../PathLSTM$ ./scripts/parse.sh
the following error appears:Could not find or load main class se.lth.cs.srl.CompletePipeline
Any idea to fix it?
Best wishes for the new year, Julien