Thanks Hieu - it seems to work now! Great!

Jörg


Jörg Tiedemann
[email protected]




On Feb 9, 2015, at 12:49 PM, Hieu Hoang wrote:

> i think i've resolved it and committed the change
>    
> https://github.com/moses-smt/mosesdecoder/commit/ce80e53b30f766ab85cb58c4a2d06742b4a4f38b
> the scores for the input path wasn't being set. At the moment, there's 
> different code paths, depending on what type of phrase-table and input type 
> so it's a little confusing. This would hopefully be resolved when we get rid 
> of the binary phrase-table
> 
> On 07/02/15 20:35, Jorg Tiedemann wrote:
>> 
>> inputtype is set to 2. I really don't know why this doesn't work.
>> 
>> Here an example:
>> 
>> lattice input:
>> 
>> ((('muutoksia',0.5,1),('Muutoksia',0.9,1),),(('yritystukikäytäntöihin',0.9,3),('yritys',0.5,1),),(('tuki',0.5,1),),(('käytäntöihin',0.5,1),),(('-',0.9,1),),(('Maakunta',0.9,2),('maa',0.5,1),),(('kunta',0.5,1),),(('-',0.9,1),),(('Alueet',0.9,1),('alueet',0.5,1),),(('-',0.9,1),),(('Uutiset',0.9,1),('uutiset',0.5,1),),(('-',0.9,1),),(('Karjalainen',0.9,1),('karjalainen',0.5,1),),)
>> 
>> nbest-list:
>> 0 ||| changes in the business practices - - - news - karjalainen  ||| 
>> Distortion0= -6 LM0= -74.8382 InputFeature0= 0 WordPenalty0= -11 
>> PhrasePenalty0= 11 TranslationModel0= -45.7094 -47.7159 -16.804 -11.8221 ||| 
>> -50.4294
>> 0 ||| changes in the business practices - - - news - karjalainen  ||| 
>> Distortion0= -6 LM0= -74.8382 InputFeature0= 0 WordPenalty0= -11 
>> PhrasePenalty0= 10 TranslationModel0= -45.7472 -47.7159 -16.5762 -11.8221 
>> ||| -50.5914
>> ...
>> 
>> The InputFeature0 is always 0
>> 
>> Decoding output includes:
>> 0 -- (muutoksia , , -0.6931) (Muutoksia , , -0.1051) 
>> 1 -- (yritystukikäytäntöihin , , -0.1053) (yritys , , -0.6931) 
>> 2 -- (tuki , , -0.6931) 
>> 3 -- (käytäntöihin , , -0.6931) 
>> 4 -- (- , , -0.1051) 
>> 5 -- (Maakunta , , -0.1052) (maa , , -0.6931) 
>> 6 -- (kunta , , -0.6931) 
>> 7 -- (- , , -0.1051) 
>> 8 -- (Alueet , , -0.1051) (alueet , , -0.6931) 
>> 9 -- (- , , -0.1051) 
>> 10 -- (Uutiset , , -0.1051) (uutiset , , -0.6931) 
>> 11 -- (- , , -0.1051) 
>> 12 -- (Karjalainen , , -0.1051) (karjalainen , , -0.6931) 
>> 
>> What I don't understand is why there is an empty field in the output above.
>> 
>> And the config file sets the weight for InputFeature0 to 1:
>> 
>> [feature]
>> InputFeature num-features=1 num-input-features=1 real-word-count=0
>> ....
>> # dense weights for feature functions                                        
>>    
>> [weight]
>> InputFeature0= 1
>> 
>> Strange ...
>> 
>> Jörg
>> 
>> 
>> Jörg Tiedemann
>> [email protected]
>> 
>> 
>> 
>> 
>> On Feb 7, 2015, at 9:21 PM, Hieu Hoang wrote:
>> 
>>> there's no reason why it shouldn't work.
>>> 
>>> the only thing i can think of is that the input type hasn't been set to 
>>> lattice. In the moses.ini, there should be something like
>>>    [inputtype]
>>>    2
>>> or on the command line
>>>    moses -inputtype 2
>>> 
>>> 
>>> Hieu Hoang
>>> Research Associate (until March 2015)
>>> ** searching for interesting commercial MT position **
>>> University of Edinburgh
>>> http://www.hoang.co.uk/hieu
>>> 
>>> 
>>> On 7 February 2015 at 20:05, Jorg Tiedemann <[email protected]> wrote:
>>> 
>>> I have a problem with lattice decoding and optimizing input-feature 
>>> weights. I have edge weights in my lattice input (one per edge) and I 
>>> defined one input feature that I'd like to optimize using MERT. However, my 
>>> the input feature value is always 0 in the nbest lists even though none of 
>>> the input edges has value 1 (or 0). What do I do wrong?
>>> 
>>> My initial config file includes:
>>> 
>>> [feature]
>>> InputFeature num-features=1 num-input-features=1 real-word-count=0
>>> ...
>>> # dense weights for feature functions
>>> [weight]
>>> InputFeature0= 1
>>> 
>>> The lattice input is valid and looks like this:
>>> 
>>> ((('word',0.8,1),('word',0.6,1), ....
>>> 
>>> MERT tuning fails in the end especially because the input feature cannot be 
>>> set.
>>> Any help is very much appreciated.
>>> Thanks,
>>> Jörg
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Moses-support mailing list
>>> [email protected]
>>> http://mailman.mit.edu/mailman/listinfo/moses-support
>>> 
>> 
> 
> -- 
> Hieu Hoang
> Research Associate (until March 2015)
> ** searching for interesting commercial MT position **
> University of Edinburgh
> http://www.hoang.co.uk/hieu

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

Reply via email to