Hi,
It looks like you are using an old version of Moses. In particular,
LanguageModelInternal does not exist anymore. Please update to the
version on https://github.com/moses-smt/mosesdecoder . Once you have
done that, there are a few options:
- Use KenLM: change the first character in lmodel-file to 8 like so:
[lmodel-file]
8 0 5
/home/lsha/Bureau/moses/working/corpusacl/naacl.en-ro-lm-0.n5.ro.arpa.gz
8 3 5
/home/lsha/Bureau/moses/working/corpusacl/naacl.en-ro-lm-3.n5.ro.arpa.gz
- Use SRILM
You will need to pass --with-srilm=/path/to/srilm/installation .
- Use IRSTLM
Install IRSTLM then pass --with-irstlm=/path/to/irstlm . Change the
first digit to 1.
For all cases, see
https://github.com/moses-smt/mosesdecoder/blob/master/BUILD-INSTRUCTIONS.txt
and
http://www.statmt.org/moses/?n=FactoredTraining.BuildingLanguageModel .
Kenneth
On 06/29/2012 06:18 PM, TODIRASCU Amalia (LGA) wrote:
> Hi,
>
> I am using Moses to build a factored English-Romanian translation system. I
> build 2 language models with SRILM (with 5-grams) for Romanian : one with
> word forms and the other with the MSD tag.
> The training step seems ok, but I obtain an error when applying Moses to the
> test data:
>
>>> moses: LanguageModelInternal.cpp:23: virtual bool
>>> Moses::LanguageModelInternal::Load(const std::string&, Moses::FactorType,
>>> float, size_t): Assertion `nGramOrder<= 3' failed.
>
> For information, the content of moses.ini is given below.
> Do you have any idea ?
>
> Thank you for your help.
>
> Best regards
> Amalia
>
> #########################
> ### MOSES CONFIG FILE ###
> #########################
>
> # input factors
> [input-factors]
> 0
> 1
> 2
> 3
>
> # mapping steps
> [mapping]
> 0 T 0
> 0 T 1
> 0 G 0
>
> # translation tables: table type (hierarchical(0), textual (0), binary (1)),
> source-factors, target-factors, number of scores, file
> # OLD FORMAT is still handled for back-compatibility
> # OLD FORMAT translation tables: source-factors, target-factors, number of
> scores, file
> # OLD FORMAT a binary table type (1) is assumed
> [ttable-file]
> 0 1 1 5
> /home/lsha/Bureau/moses/working/corpusacl/tm-enro/model/phrase-table.1-1.gz
> 0 3 3 5
> /home/lsha/Bureau/moses/working/corpusacl/tm-enro/model/phrase-table.3-3.gz
>
> # generation models: source-factors, target-factors, number-of-weights,
> filename
> [generation-file]
> 1,3 0 1
> /home/lsha/Bureau/moses/working/corpusacl/tm-enro/model/generation.1,3-0
>
> # language models: type(srilm/irstlm), factors, order, file
> [lmodel-file]
> 0 0 5 /home/lsha/Bureau/moses/working/corpusacl/naacl.en-ro-lm-0.n5.ro.arpa.gz
> 0 3 5 /home/lsha/Bureau/moses/working/corpusacl/naacl.en-ro-lm-3.n5.ro.arpa.gz
>
>
> # limit on how many phrase translations e for each phrase f are loaded
> # 0 = all elements loaded
> [ttable-limit]
> 20
> 0
>
> # distortion (reordering) weight
> [weight-d]
> 0.6
>
> # language model weights
> [weight-l]
> 0.2500
> 0.2500
>
>
> # translation model weights
> [weight-t]
> 0.2
> 0.2
> 0.2
> 0.2
> 0.2
> 0.2
> 0.2
> 0.2
> 0.2
> 0.2
>
> # generation model weights
> [weight-generation]
> 0.3
>
> # word penalty
> [weight-w]
> -1
>
> [distortion-limit]
> 6
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support