Moses-support Digest, Vol 87, Issue 3

Send Moses-support mailing list submissions to
moses-support@mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.mit.edu/mailman/listinfo/moses-support
or, via email, send a message with subject or body 'help' to
moses-support-request@mit.edu

You can reach the person managing the list at
moses-support-owner@mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moses-support digest..."


Today's Topics:

1. Re: problem with weighting translation models using
client_multimodel.py (Rico Sennrich)
2. Is it possible to add bilingual dictionary in already trained
PBSMT? (Rajen Chatterjee)


----------------------------------------------------------------------

Message: 1
Date: Thu, 02 Jan 2014 13:54:55 +0100
From: Rico Sennrich <rico.sennrich@gmx.ch>
Subject: Re: [Moses-support] problem with weighting translation models
using client_multimodel.py
To: ??????? ????????? <verbalab@yandex.ru>, moses-support@mit.edu
Message-ID: <52C5619F.4040909@gmx.ch>
Content-Type: text/plain; charset=KOI8-R; format=flowed

Hi Alexander

The server still had a stupid/broken assumption that the MultiModel
phrase table would be first in the config. I updated the code that it is
now specified by name by the client. This call should work for you (with
the newest moses commit):

translate(['i have a dream'],server,[0.1,0.2], "PhraseDictionaryMultiModel0")



On a related note: the phrase table format has recently changed (the
constant phrase penalty was removed from the table and is now a separate
feature function). This broke some assumptions in the MultiModel code,
and it has now been fixed. This may lead to different results if someone
wants to use the newest decoder, but has phrase tables with the phrase
penalty (5 features instead of 4). To restore the original results, they
need to modify their config file as follows:

add PhrasePenalty to the [feature] section and modify the weight section
as follows:

before:

[weight]
PhraseDictionaryMultiModel0= 0.00402447059454402 0.0685647475075862
0.294089113124688 0.0328320356515851 -0.0426081987467227

after:

[weight]
PhrasePenalty0= -0.0426081987467227
PhraseDictionaryMultiModel0= 0.00402447059454402 0.0685647475075862
0.294089113124688 0.0328320356515851 0


best wishes,
Rico

On 27.12.2013 12:02, ??????? ????????? wrote:
> Hello, Rico
>
> I am using version 95a41c44facbfe49962b2b28234d0d0a08183032.
> Previously there were not any messages, but after i rebooted the server it started to respond with the following:
>
> ~/mosesdecoder/contrib/server$ sudo python ./client_multimodel.py
> Traceback (most recent call last):
> File "./client_multimodel.py", line 78, in <module>
> translate(['i have a dream'],server,[0.1,0.9])
> File "./client_multimodel.py", line 27, in translate
> print server.translate(params)
> File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
> return self.__send(self.__name, args)
> File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
> verbose=self.__verbose
> File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
> return self.single_request(host, handler, request_body, verbose)
> File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
> return self.parse_response(response)
> File "/usr/lib/python2.7/xmlrpclib.py", line 1473, in parse_response
> return u.close()
> File "/usr/lib/python2.7/xmlrpclib.py", line 793, in close
> raise Fault(**self._stack[0])
> xmlrpclib.Fault: <Fault -500: 'Unexpected error executing code for particular method, detected by Xmlrpc-c method registry code. Method did not fail; rather, it did not complete at all. boost::lock_error'>
>
> In case when no weights are given, everything is ok.
>
>
> PS The OS is Ubuntu 12.04.2 LTS
>
> Best regards!
>
> 25.12.2013, 19:07, "Rico Sennrich" <rico.sennrich@gmx.ch>:
>> I can't immediately see anything wrong with your config. Can you tell me
>> which version (git commit) of Moses you're using, and if there is an
>> error message on the side of the moses server?
>>
>> It's conceivable that the new phrase table format (with the phrase
>> penalty being a separate feature function) doesn't yet work well with
>> the MultiModel phrase table; I'll do some tests early next year.
>>
>> best wishes,
>> Rico
>>
>> On 24.12.2013 09:46, ??????? ????????? wrote:
>>
>>> Sorry, I provided you with wrong example:
>>>
>>> When I launch function with string parameter ( translate(['i have a dream'],server,'0.1,0.2') ), it returns an error like that:
>>>
>>> "Method did not fail; rather, it did not complete at all. Not array type. See type() method'"
>>>
>>> But if i use list of floats ( translate(['i have a dream'],server,[0.1,0.2]) ), it remains silent, reporting no error and giving no translation as well.
>>> When I interrupt the script, it returns such log:
>>>
>>> Traceback (most recent call last):
>>> File "client_multimodel.py", line 78, in <module>
>>> translate(['i have a dream'],server,[0.2,0.2])
>>> File "client_multimodel.py", line 27, in translate
>>> print server.translate(params)
>>> File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
>>> return self.__send(self.__name, args)
>>> File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
>>> verbose=self.__verbose
>>> File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
>>> return self.single_request(host, handler, request_body, verbose)
>>> File "/usr/lib/python2.7/xmlrpclib.py", line 1294, in single_request
>>> response = h.getresponse(buffering=True)
>>> File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
>>> response.begin()
>>> File "/usr/lib/python2.7/httplib.py", line 407, in begin
>>> version, status, reason = self._read_status()
>>> File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
>>> line = self.fp.readline()
>>> File "/usr/lib/python2.7/socket.py", line 447, in readline
>>> data = self._sock.recv(self._rbufsize)
>>>
>>> Can you please advice upon where the problem could be?
>>>
>>> Kind regards,
>>> Alexander Kalinin.
>>>
>>> 23.12.2013, 20:43, "Rico Sennrich" <rico.sennrich@gmx.ch>:
>>>> ??????? ????????? <verbalab@...> writes:
>>>>> Hi, everyone!
>>>>>
>>>>> I have a problem with weighting two translation models using
>>>> client_multimodel.py. When I function like
>>>>> that (with no weights):
>>>>>
>>>>> translate(['i have a dream'],server)
>>>>>
>>>>> it's ok - Moses responses me with translation via xmlrpc.
>>>>>
>>>>> But when I try to add weigts like that
>>>>>
>>>>> translate(['i have a dream'],server, '0.1,0.1')
>>>>>
>>>>> it returns nothing, neither translation nor error report.
>>>> Hi Alexander,
>>>>
>>>> '0.1,0.1' is a string, but the function translate expects a list of floats.
>>>> Try this:
>>>>
>>>> translate(['i have a dream'],server, [0.1, 0.1])
>>>>
>>>> Tell me if this works; I'll try to better document the arguments early next
>>>> year.
>>>>
>>>> -
>>>> Rico
>>>>
>>>> _______________________________________________
>>>> Moses-support mailing list
>>>> Moses-support@mit.edu
>>>> http://mailman.mit.edu/mailman/listinfo/moses-support



------------------------------

Message: 2
Date: Thu, 2 Jan 2014 14:43:07 +0000
From: Rajen Chatterjee <rajen.k.chatterjee@gmail.com>
Subject: [Moses-support] Is it possible to add bilingual dictionary in
already trained PBSMT?
To: "moses-support@mit.edu" <moses-support@mit.edu>
Message-ID:
<CAC4-+NxCZTTniFDX0igD6Q1UmWurmBdkrLi_CT+htUQN9W+x=Q@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello,
I have already trained a PBSMT, after training I found some
bilingual dictionary which I would like to add in phrase table. So is there
any script in moses which will add this into phrase table without
re-training the systen?
--
-Regards,
Rajen Chatterjee.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20140102/057370c5/attachment-0001.htm

------------------------------

_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


End of Moses-support Digest, Vol 87, Issue 3
********************************************

0 Response to "Moses-support Digest, Vol 87, Issue 3"

Post a Comment