Hi Massinissa

Yes, in the features section of your ini file, you don't specify how many scores are in the translation table, so moses assumes 1. But then you give it 4 weights, so it complains about the mismatch.

If you have a standard phrase table, you need to add "num-features=4" to the line which begins "PhraseDictionaryMemory"

cheers - Barry

On 27/06/14 09:54, Massinissa Ahmim wrote:
Hi Barry,

Thanks a lot !

I switched both to 0 but I'm still getting this message :

FeatureFunction: TranslationModel0 start: 3 end: 3
Exception: moses/ScoreComponentCollection.cpp:242 in void Moses::ScoreComponentCollection::Assign(const Moses::FeatureFunction*, const std::vector<float>&) threw util::Exception'. Feature function TranslationModel0 specified 1 dense scores or weights. Actually has 4





2014-06-26 22:29 GMT+02:00 Barry Haddow <[email protected] <mailto:[email protected]>>:

    Hi Massinissa

    Are you loading the right ini file? The one in the debug message
    is different from the one you show at the bottom of your mail. In
    particular, the debug message shows that you are mixing
    "TranslationModel0" and TranslationModel1" which is why Moses
    complains about missing weights,

    cheers - Barry


    On 26/06/14 20:48, Massinissa Ahmim wrote:

        Dear all,

        I'm having some troubles loading the binary phrasetable using
        the latest version of moses.

        When querying my moses.ini using :

        echo 'le monde' |/home/mosesdecoder/bin/moses -f moses.ini


        I'm getting this error :

        Defined parameters (per moses.ini or switch):
        config: moses.ini
        distortion-limit: 6
        feature: UnknownWordPenalty WordPenalty PhrasePenalty
        PhraseDictionaryMemory name=TranslationModel0 table-limit=20
        path=/home/training/binarised-model/phrase-table
        input-factor=0 output-factor=0 LexicalReordering
        name=LexicalReordering0 num-features=6
        type=wbe-msd-bidirectional-fe-allff input-factor=0
        output-factor=0
        path=/home/training/binarised-model/reordering-table
        Distortion KENLM lazyken=0 name=LM0 factor=1
        path=/home/Massi/UN.en-fr.en.lm.blm.en order=5
        input-factors: 0
        mapping: 0 T 0
        weight: UnknownWordPenalty0= 1 WordPenalty0= -1
        PhrasePenalty0= 0.2 TranslationModel1= 0.2 0.2 0.2 0.2
        LexicalReordering0= 0.3 0.3 0.3 0.3 0.3 0.3 Distortion0= 0.3
        LM0= 0.5
        line=UnknownWordPenalty
        FeatureFunction: UnknownWordPenalty0 start: 0 end: 0
        line=WordPenalty
        FeatureFunction: WordPenalty0 start: 1 end: 1
        line=PhrasePenalty
        FeatureFunction: PhrasePenalty0 start: 2 end: 2
        line=PhraseDictionaryMemory name=TranslationModel0
        table-limit=20
        path=/home/training/binarised-model/phrase-table
        input-factor=0 output-factor=0
        FeatureFunction: TranslationModel0 start: 3 end: 3
        Exception: moses/ScoreComponentCollection.cpp:242 in void
        Moses::ScoreComponentCollection::Assign(const
        Moses::FeatureFunction*, const std::vector<float>&) threw
        util::Exception'.
        Feature function TranslationModel0 specified 1 dense scores or
        weights. Actually has 0

        Here is my moses.ini

        #########################
        ### MOSES CONFIG FILE ###
        #########################

        # input factors
        [input-factors]
        0

        # mapping steps
        [mapping]
        0 T 0

        [distortion-limit]
        6

        # feature functions
        [feature]
        UnknownWordPenalty
        WordPenalty
        PhrasePenalty
        PhraseDictionaryMemory name=TranslationModel0 table-limit=20
        num-features=4
        path=/home/training/binarised-model/phrase-table
        input-factor=0 outp
        ut-factor=0
        LexicalReordering name=LexicalReordering0 num-features=6
        type=wbe-msd-bidirectional-fe-allff input-factor=0
        output-factor=0 path=/home/training/
        binarised-model/reordering-table
        Distortion
        KENLM lazyken=0 name=LM0 factor=1
        path=/home/Massi/UN.en-fr.en.lm.blm.en order=5

        # dense weights for feature functions
        [weight]
        UnknownWordPenalty0= 1
        WordPenalty0= -1
        PhrasePenalty0= 0.2
        TranslationModel0= 0.2 0.2 0.2 0.2
        LexicalReordering0= 0.3 0.3 0.3 0.3 0.3 0.3
        Distortion0= 0.3
        LM0= 0.5


        Any suggestion ?

        Many thanks

        Massinissa

--
        Description : Description : lingua_custodia_final full logo

        */The Translation Trustee/*

        *1, Place Charles de Gaulle*

        *78180 Montigny-le-Bretonneux*

        *Tel : +33 1 30 44 04 23 <tel:%2B33%201%2030%2044%2004%2023>
        Mobile : +33 7 61 44 40 84 <tel:%2B33%207%2061%2044%2040%2084>*

        *Email :****[email protected]
        <mailto:[email protected]>
        <mailto:[email protected]
        <mailto:[email protected]>>***

        *Website :****www.linguacustodia.com
        <http://www.linguacustodia.com>
        <http://www.linguacustodia.com/> -
        www.thetranslationtrustee.com
        <http://www.thetranslationtrustee.com>
        <http://www.thetranslationtrustee.com>*

        üPensez à l’environnement, n’imprimez ce courriel que si
        nécessaire.


        Please do not print this email unless it is absolutely
        necessary. Spread environmental awareness.



        _______________________________________________
        Moses-support mailing list
        [email protected] <mailto:[email protected]>
        http://mailman.mit.edu/mailman/listinfo/moses-support



-- The University of Edinburgh is a charitable body, registered in
    Scotland, with registration number SC005336.




--

Description : Description : lingua_custodia_final full logo

*/The Translation Trustee/*

*1, Place Charles de Gaulle*

*78180 Montigny-le-Bretonneux*

*Tel : +33 1 30 44 04 23  Mobile : +33 7 61 44 40 84*

*Email :****[email protected] <mailto:[email protected]>***

*Website :****www.linguacustodia.com <http://www.linguacustodia.com/> - www.thetranslationtrustee.com <http://www.thetranslationtrustee.com>*

ü Pensez à l’environnement, n’imprimez ce courriel que si nécessaire.

Please do not print this email unless it is absolutely necessary. Spread environmental awareness.


_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to