Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: No built-in rules for language de. #92

Open
shiny1022 opened this issue Dec 10, 2018 · 3 comments
Open

Warning: No built-in rules for language de. #92

shiny1022 opened this issue Dec 10, 2018 · 3 comments

Comments

@shiny1022
Copy link

shiny1022 commented Dec 10, 2018

I‘m training a tensorflow-based Nematus system. When I translate English into German, there are some problems.
here is the script:

src=en
trg=de
device=0
model=$working_dir/model.best-valid-script
dev_prefix=dev
dev=$dev_prefix.bpe.$src
ref=$dev_prefix.$trg

# decode
CUDA_VISIBLE_DEVICES=$device python $nematus/nematus/translate.py \
     -m $model \
     -i $data_dir/$dev \
     -o $working_dir/$dev.output.dev \
     -k 12 \
     -n
# evaluate translations and write BLEU score to standard output (for use by nmt.py)
$nematus/postprocess.sh < $working_dir/$dev.output.dev | \
$nematus/data/multi-bleu-detok.perl data/$ref | \
    cut -f 3 -d ' ' | \
    cut -f 1 -d ','

I got this error:

Warning: No built-in rules for language de.
Detokenizer Version $Revision: 4134 $
Language: de
Use of uninitialized value $length_reference in numeric eq (==) at /home/moses/NLP/workspace/mt/data/multi-bleu-detok.perl line 155.
0

Anyone can help me ?
Thanks!

@pjwilliams
Copy link
Collaborator

pjwilliams commented Dec 10, 2018 via email

@shiny1022
Copy link
Author

Yes,the translation output file is empty. Then I ran the translate.py and it still couldn't work and occured the same error. No config files missing. It seemed that the model could‘t translate the input file.Here may be some problems in the process of translation.I'm confused about that.

@bricksdont
Copy link
Collaborator

bricksdont commented Mar 27, 2019

Can you please provide a complete script, where all variables are defined? Examples of missing variables: $working_dir, $nematus.

Please check the contents of the file $data_dir/$dev. How many lines are in this file?

Which version of Nematus are you using, i.e. which commit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants