Closed ardate closed 8 years ago
Hi there,
Thank you very much for bringing this problem up. The manual was indeed outdated, it has just been updated.To run it you can try:
java
-cp QuEst.jar shef.mt.WordLevelFeatureExtractor -lang
Hi,
Thanks a lot for your quick reply and update on the documentation!
If I run the following: java -cp QuEst++.jar shef.mt.WordLevelFeatureExtractor -lang en de -input ./input/input.source.txt ./input/input.target.txt -mode ./lib/stanford-corenlp-3.5.1-models.jar -config ./config/config.word-level.properties -alignments ../fast_align/fast_align.txt
I get the following error:
\ Parsing arguments **
java.lang.NullPointerException
at java.io.File.
\ Setting up folders **
Work dir: /home/quest++/questplusplus-master
Input folder: /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased
Output folder: /home/quest++/questplusplus-master/features/output
Dec 24, 2015 10:20:08 AM shef.mt.WordLevelFeatureExtractor run
SEVERE: null
java.io.FileNotFoundException: /home/quest++/questplusplus-master/features/output/output.txt (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.
\ Creating necessary folders ** Input folder created /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased Input folder created /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased/en Input folder created /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased/es Input folder created /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased/es/temp Output folder created /features/output
\ Producing missing resources **
\ Creating processors **
\ Producing output ** Exception in thread "main" java.lang.NullPointerException at shef.mt.WordLevelFeatureExtractor.run(WordLevelFeatureExtractor.java:143) at shef.mt.WordLevelFeatureExtractor.main(WordLevelFeatureExtractor.java:79 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: shef.mt.WordLevelFeatureExtractor. Program will exit.
Could this be a related issue? Am I providing the languages correctly? Maybe I am missing something simple. Thank you in advance.
Hi there :) I believe the problem is with the "-mode" parameter. It refers to the "featureConfig" parameter in the config file: if you include a line such as "featureConfig.all = my_features.xml" in the config file, for an example, then you have a mode called "all". You may also include any other modes you wish in your config file, such as a "blackbox" mode ("featureConfig.blackbox = my_blackbox_features.xml"). Try replacing your "-mode" argument with one of the modes in your config file, such as "all". :) Hope that helps!
Gustavo Henrique PaetzoldPh.D. Candidate in Computer ScienceUniversity of Sheffield
Date: Thu, 24 Dec 2015 02:22:45 -0800 From: notifications@github.com To: questplusplus@noreply.github.com CC: ghpaetzold@outlook.com Subject: Re: [questplusplus] WordLevelFeatureExtractor (#17)
Hi,
Thanks a lot for your quick reply and update on the documentation!
If I run the following:
java -cp QuEst++.jar shef.mt.WordLevelFeatureExtractor -lang en de -input ./input/input.source.txt ./input/input.target.txt -mode ./lib/stanford-corenlp-3.5.1-models.jar -config ./config/config.word-level.properties -alignments ../fast_align/fast_align.txt
I get the following error:
\ Parsing arguments **
java.lang.NullPointerException
at java.io.File.(File.java:277)
at shef.mt.features.util.FeatureLoader.loadFeatures(FeatureLoader.java:89)
at shef.mt.features.util.FeatureLoader.(FeatureLoader.java:32)
at shef.mt.features.util.FeatureManager.registerFeatures(FeatureManager.java:75)
at shef.mt.features.util.FeatureManager.setFeatureList(FeatureManager.java:58)
at shef.mt.WordLevelFeatureExtractor.parseArguments(WordLevelFeatureExtractor.java:343)
at shef.mt.WordLevelFeatureExtractor.(WordLevelFeatureExtractor.java:61)
at shef.mt.WordLevelFeatureExtractor.main(WordLevelFeatureExtractor.java:78)
features:{}
\ Setting up folders **
Work dir: /home/quest++/questplusplus-master
Input folder: /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased
Output folder: /home/quest++/questplusplus-master/features/output
Dec 24, 2015 10:20:08 AM shef.mt.WordLevelFeatureExtractor run
SEVERE: null
java.io.FileNotFoundException: /home/quest++/questplusplus-master/features/output/output.txt (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:101)
at java.io.FileWriter.(FileWriter.java:63)
at shef.mt.WordLevelFeatureExtractor.run(WordLevelFeatureExtractor.java:91)
at shef.mt.WordLevelFeatureExtractor.main(WordLevelFeatureExtractor.java:79)
\ Creating necessary folders **
Input folder created /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased
Input folder created /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased/en
Input folder created /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased/es
Input folder created /home/quest++/questplusplus-master/features/input # source vs mt, tokenized, lowercased/es/temp
Output folder created /features/output
\ Producing missing resources **
\ Creating processors **
\ Producing output **
Exception in thread "main" java.lang.NullPointerException
at shef.mt.WordLevelFeatureExtractor.run(WordLevelFeatureExtractor.java:143)
at shef.mt.WordLevelFeatureExtractor.main(WordLevelFeatureExtractor.java:79
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: shef.mt.WordLevelFeatureExtractor. Program will exit.
Could this be a related issue? Am I providing the languages correctly? Maybe I am missing something simple.
Thank you in advance.
— Reply to this email directly or view it on GitHub.
Indeed! Thank you very much!
Arda
I close this issue owing to @ardate's last comment.
Hi, I am trying to extract word-level features based on the documentation /manuals/Word-Level Quest++ Manual.pdf.
java -cp ./QuEst++.jar shef.mt.enes.WordLevelFeatureExtractor gives me the following error: Error: Could not find or load main class shef.mt.enes.WordLevelFeatureExtractor
On the other hand, java -cp ./QuEst++.jar shef.mt.WordLevelFeatureExtractor works.
However, when I call it with 'lang', 'input', 'mode' and 'config' as follows: java -cp ./QuEst++.jar shef.mt.enes.WordLevelFeatureExtractor -lang en es -input test.source test.target -mode ./lib/stanford-spanish-corenlp-2015-01-08-models.jar -config ./config/config.word-level.properties
I get the following error: java.lang.NullPointerException at java.io.File.(File.java:277)
at shef.mt.features.util.FeatureLoader.loadFeatures(FeatureLoader.java:89)
at shef.mt.features.util.FeatureLoader.(FeatureLoader.java:32)
at shef.mt.features.util.FeatureManager.registerFeatures(FeatureManager.java:75)
at shef.mt.features.util.FeatureManager.setFeatureList(FeatureManager.java:58)
at shef.mt.WordLevelFeatureExtractor.parseArguments(WordLevelFeatureExtractor.java:343)
at shef.mt.WordLevelFeatureExtractor.(WordLevelFeatureExtractor.java:61)
at shef.mt.WordLevelFeatureExtractor.main(WordLevelFeatureExtractor.java:78)
features:{}
Does this command look correct? Should shef.mt.enes.WordLevelFeatureExtractor or shef.mt.WordLevelFeatureExtractor be used? Thanks in advance!