You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@joshua.apache.org by Fernando E Alva Manchego <fe...@sheffield.ac.uk> on 2016/11/17 17:37:53 UTC

Error while running the tutorial

Hello!

I'm running the tutorial (phrase) and the following error came up:

Error: Could not find or load main class org.apache.joshua.tools.
GrammarPackerCli

When I installed Joshua, I ran the tests and everything was OK. Do you have
any idea what might be happening? Thank you.

Best,
Fernando

Re: Error while running the tutorial

Posted by Fernando E Alva Manchego <fe...@sheffield.ac.uk>.
Hello,

1. Here's the list requested:

archive-tmp
classes
generated-sources
joshua-6.2-SNAPSHOT.jar
joshua-6.2-SNAPSHOT-jar-with-dependencies.jar
joshua-6.2-SNAPSHOT-src.tar.gz
joshua-6.2-SNAPSHOT-src.zip
maven-archiver
maven-shared-archive-resources
rat.txt
surefire-reports
test-classes

2. After running that command the error message changes:
[pack-grammar] rebuilding...
  dep=.../joshua-tutorial/runs/1/grammar.packed/vocabulary [NOT FOUND]
  dep=.../joshua-tutorial/runs/1/grammar.packed/encoding [NOT FOUND]
  dep=.../joshua-tutorial/runs/1/grammar.packed/slice_00000.source [NOT
FOUND]
  cmd=..../joshua/scripts/support/grammar-packer.pl -a -T /tmp -m 8g -g
grammar.gz -o ..../joshua-tutorial/runs/1/grammar.packed
  JOB FAILED (return code 1)
Exception in thread "main" java.util.NoSuchElementException
at org.apache.joshua.util.io.LineReader.next(LineReader.java:276)
at
org.apache.joshua.tools.GrammarPacker.getGrammarReader(GrammarPacker.java:239)
at org.apache.joshua.tools.GrammarPacker.pack(GrammarPacker.java:184)
at org.apache.joshua.tools.GrammarPackerCli.run(GrammarPackerCli.java:120)
at org.apache.joshua.tools.GrammarPackerCli.main(GrammarPackerCli.java:137)
* FATAL: Couldn't pack the grammar.
* Copying sorted grammars (/tmp/grammar.gze1qd) to current directory.



Best,
Fernando Alva Manchego (PhD Candidate)
NLP Research Group - Department of Computer Science
University of Sheffield

On 17 November 2016 at 18:09, Matt Post <po...@cs.jhu.edu> wrote:

> Please send a listing of the contents of the "$JOSHUA/target" directory.
>
> Try running "mvn package" in $JOSHUA, and see if that helps.
>
>
> On Nov 17, 2016, at 12:59 PM, Fernando E Alva Manchego <
> fealvamanchego1@sheffield.ac.uk> wrote:
>
> Hello,
>
> Thanks for the quick reply:
>
> (a) I followed the instructions in the Getting Started page. I didn't have
> Maven in my computer, so I downloaded Maven 3.3.9. When I ran mvn test the
> message I got at the end was:
>
> Tests run: 151, Failures: 0, Errors: 0, Skipped: 0
>
> So that's why I assume everything was OK with the installation.
>
> (b) The command I typed was:
>
> $JOSHUA/bin/pipeline.pl \
>   --rundir 2 \
>   --readme "Baseline phrase run" \
>   --source es \
>   --target en \
>   --type phrase \
>   --corpus $FISHER/corpus/asr/fisher_train \
>   --tune $FISHER/corpus/asr/fisher_dev \
>   --test $FISHER/corpus/asr/fisher_dev2 \
>   --maxlen 11 \
>   --maxlen-tune 11 \
>   --maxlen-test 11 \
>   --tuner-iterations 1 \
>   --lm-order 3
>
> It's exactly as shown in the Tutorial page, except for the ldc folder
> which I changed to asr. After running that command, I get (at the end of a
> long list of other commandas):
>
> dep= .../joshua-tutorial/runs/1/grammar.packed/vocabulary [NOT FOUND]
>   dep= .../joshua-tutorial/runs/1/grammar.packed/encoding [NOT FOUND]
>   dep= ... /joshua-tutorial/runs/1/grammar.packed/slice_00000.source [NOT
> FOUND]
>   cmd= .../joshua/scripts/support/grammar-packer.pl -a -T /tmp -m 8g -g
> grammar.gz -o /export/data/falva/joshua-tutorial/runs/1/grammar.packed
>   JOB FAILED (return code 1)
> Error: Could not find or load main class org.apache.joshua.tools.
> GrammarPackerCli
> * FATAL: Couldn't pack the grammar.
> * Copying sorted grammars (/tmp/grammar.gzL3kB) to current directory
>
> Any suggestion is more than welcomed. Thanks.
>
> Best,
> Fernando
>
> On 17 November 2016 at 17:50, Matt Post <po...@cs.jhu.edu> wrote:
>
>> Hello,
>>
>> Thanks for the note. Can you please tell us:
>>
>> (a) how you installed Joshua?
>>
>> (b) the command you typed that failed?
>>
>> matt
>>
>>
>> On Nov 17, 2016, at 12:37 PM, Fernando E Alva Manchego <
>> fealvamanchego1@sheffield.ac.uk> wrote:
>>
>> Hello!
>>
>> I'm running the tutorial (phrase) and the following error came up:
>>
>> Error: Could not find or load main class org.apache.joshua.tools.Gramma
>> rPackerCli
>>
>> When I installed Joshua, I ran the tests and everything was OK. Do you
>> have any idea what might be happening? Thank you.
>>
>> Best,
>> Fernando
>>
>>
>>
>
>

Re: Error while running the tutorial

Posted by Matt Post <po...@cs.jhu.edu>.
Please send a listing of the contents of the "$JOSHUA/target" directory.

Try running "mvn package" in $JOSHUA, and see if that helps.


> On Nov 17, 2016, at 12:59 PM, Fernando E Alva Manchego <fe...@sheffield.ac.uk> wrote:
> 
> Hello,
> 
> Thanks for the quick reply:
> 
> (a) I followed the instructions in the Getting Started page. I didn't have Maven in my computer, so I downloaded Maven 3.3.9. When I ran mvn test the message I got at the end was:
> 
> Tests run: 151, Failures: 0, Errors: 0, Skipped: 0
> 
> So that's why I assume everything was OK with the installation.
> 
> (b) The command I typed was:
> 
> $JOSHUA/bin/pipeline.pl <http://pipeline.pl/> \
>   --rundir 2 \
>   --readme "Baseline phrase run" \
>   --source es \
>   --target en \
>   --type phrase \
>   --corpus $FISHER/corpus/asr/fisher_train \
>   --tune $FISHER/corpus/asr/fisher_dev \
>   --test $FISHER/corpus/asr/fisher_dev2 \
>   --maxlen 11 \
>   --maxlen-tune 11 \
>   --maxlen-test 11 \
>   --tuner-iterations 1 \
>   --lm-order 3
> 
> It's exactly as shown in the Tutorial page, except for the ldc folder which I changed to asr. After running that command, I get (at the end of a long list of other commandas):
> 
> dep= .../joshua-tutorial/runs/1/grammar.packed/vocabulary [NOT FOUND]
>   dep= .../joshua-tutorial/runs/1/grammar.packed/encoding [NOT FOUND]
>   dep= ... /joshua-tutorial/runs/1/grammar.packed/slice_00000.source [NOT FOUND]
>   cmd= .../joshua/scripts/support/grammar-packer.pl <http://grammar-packer.pl/> -a -T /tmp -m 8g -g grammar.gz -o /export/data/falva/joshua-tutorial/runs/1/grammar.packed
>   JOB FAILED (return code 1)
> Error: Could not find or load main class org.apache.joshua.tools.GrammarPackerCli
> * FATAL: Couldn't pack the grammar.
> * Copying sorted grammars (/tmp/grammar.gzL3kB) to current directory
> 
> Any suggestion is more than welcomed. Thanks.
> 
> Best,
> Fernando 
> 
> On 17 November 2016 at 17:50, Matt Post <post@cs.jhu.edu <ma...@cs.jhu.edu>> wrote:
> Hello,
> 
> Thanks for the note. Can you please tell us:
> 
> (a) how you installed Joshua?
> 
> (b) the command you typed that failed?
> 
> matt
> 
> 
>> On Nov 17, 2016, at 12:37 PM, Fernando E Alva Manchego <fealvamanchego1@sheffield.ac.uk <ma...@sheffield.ac.uk>> wrote:
>> 
>> Hello!
>> 
>> I'm running the tutorial (phrase) and the following error came up:
>> 
>> Error: Could not find or load main class org.apache.joshua.tools.GrammarPackerCli
>> 
>> When I installed Joshua, I ran the tests and everything was OK. Do you have any idea what might be happening? Thank you.
>> 
>> Best,
>> Fernando 
> 
> 


Re: Error while running the tutorial

Posted by Fernando E Alva Manchego <fe...@sheffield.ac.uk>.
Hello,

Thanks for the quick reply:

(a) I followed the instructions in the Getting Started page. I didn't have
Maven in my computer, so I downloaded Maven 3.3.9. When I ran mvn test the
message I got at the end was:

Tests run: 151, Failures: 0, Errors: 0, Skipped: 0

So that's why I assume everything was OK with the installation.

(b) The command I typed was:

$JOSHUA/bin/pipeline.pl \
  --rundir 2 \
  --readme "Baseline phrase run" \
  --source es \
  --target en \
  --type phrase \
  --corpus $FISHER/corpus/asr/fisher_train \
  --tune $FISHER/corpus/asr/fisher_dev \
  --test $FISHER/corpus/asr/fisher_dev2 \
  --maxlen 11 \
  --maxlen-tune 11 \
  --maxlen-test 11 \
  --tuner-iterations 1 \
  --lm-order 3

It's exactly as shown in the Tutorial page, except for the ldc folder which
I changed to asr. After running that command, I get (at the end of a long
list of other commandas):

dep= .../joshua-tutorial/runs/1/grammar.packed/vocabulary [NOT FOUND]
  dep= .../joshua-tutorial/runs/1/grammar.packed/encoding [NOT FOUND]
  dep= ... /joshua-tutorial/runs/1/grammar.packed/slice_00000.source [NOT
FOUND]
  cmd= .../joshua/scripts/support/grammar-packer.pl -a -T /tmp -m 8g -g
grammar.gz -o /export/data/falva/joshua-tutorial/runs/1/grammar.packed
  JOB FAILED (return code 1)
Error: Could not find or load main class
org.apache.joshua.tools.GrammarPackerCli
* FATAL: Couldn't pack the grammar.
* Copying sorted grammars (/tmp/grammar.gzL3kB) to current directory

Any suggestion is more than welcomed. Thanks.

Best,
Fernando

On 17 November 2016 at 17:50, Matt Post <po...@cs.jhu.edu> wrote:

> Hello,
>
> Thanks for the note. Can you please tell us:
>
> (a) how you installed Joshua?
>
> (b) the command you typed that failed?
>
> matt
>
>
> On Nov 17, 2016, at 12:37 PM, Fernando E Alva Manchego <
> fealvamanchego1@sheffield.ac.uk> wrote:
>
> Hello!
>
> I'm running the tutorial (phrase) and the following error came up:
>
> Error: Could not find or load main class org.apache.joshua.tools.Gramma
> rPackerCli
>
> When I installed Joshua, I ran the tests and everything was OK. Do you
> have any idea what might be happening? Thank you.
>
> Best,
> Fernando
>
>
>

Re: Error while running the tutorial

Posted by Matt Post <po...@cs.jhu.edu>.
Hello,

Thanks for the note. Can you please tell us:

(a) how you installed Joshua?

(b) the command you typed that failed?

matt


> On Nov 17, 2016, at 12:37 PM, Fernando E Alva Manchego <fe...@sheffield.ac.uk> wrote:
> 
> Hello!
> 
> I'm running the tutorial (phrase) and the following error came up:
> 
> Error: Could not find or load main class org.apache.joshua.tools.GrammarPackerCli
> 
> When I installed Joshua, I ran the tests and everything was OK. Do you have any idea what might be happening? Thank you.
> 
> Best,
> Fernando