Hi Evgeny,

"passing n-best size is commented out" because m_bestSize is deprecated.

Instead m_options.nbest.nbest_size is used, which is updated via the call
to m_options.update(params) at nor near line 277 in TranslationRequest.cpp.
So TranslationRequest is actually paying attention to the "nbest"
parameter, just not through the deprecated variable m_nbestSize.

My long-term strategy  is to have one Class
(moses/parameters/)AllOptions(.h) that stores all the options for a
particular translation request, bundled roughly thematically (e.g., nbest
lists, OOV handling, etc.) The defaults are copied from StaticData when a
TranslationRequest is instantiated, and then updated via the aforementioned
call to m_options.update(params).

If you want to set any additional parameters through the server interface
that aren't set yet, do it through m_options.update(). I'm gradually moving
all the variables from StaticData into the Options classes, but I'm doing
it one variable at a time, because there are so many of them and calls to
StaticData::Instance().GetSomeVariableThatShouldntBeGlobalButIs() have
metastasised throughout the code base. If there's a variable that's still
in StaticData that you need to update dynamically, let me know and I'll
prioritize the transition.

The placeholder factor, by the way (since that is relevant for what you are
trying to do), is stored in
TraslationRequest.m_options.input.placeholder_factor.

Cheers - Uli



On Tue, Nov 17, 2015 at 2:43 PM, Evgeny Matusov <[email protected]> wrote:

> Hi active Moses developers,
>
>
> As promised, I am working on adding the correct placeholder output to
> Moses in the server mode. Currently, passing the n-best size through xmlrpc
> is commented out. Any reason why this is the case? It might be convenient
> to run server queries with/without N-best output and with different N-best
> sizes without having to restart the server (currently, this is the only way
> to do it).
>
>
> If there are no objections, I will put this parameter back into the code.
>
>
> Best,
>
> Evgeny.
>
>
> ------------------------------
> *From:* Evgeny Matusov
> *Sent:* Wednesday, November 11, 2015 10:30 AM
> *To:* [email protected]
>
> *Cc:* [email protected]
> *Subject:* Re: [Moses-support] use placeholder with mosesserver
>
>
> Hi Uli,
>
>
> thanks a lot! We will try to add some test cases for Mosesserver,
> including XML input with/without placeholders.
>
>
> Best,
>
> Evgeny.
>
>
> ------------------------------
> *From:* Ulrich Germann <[email protected]>
> *Sent:* Wednesday, November 11, 2015 2:58 AM
> *To:* Evgeny Matusov
> *Cc:* [email protected]
> *Subject:* Re: [Moses-support] use placeholder with mosesserver
>
> Hi all,
>
> I've just pushed what I believe might address a few of the issues in this
> thread:
>
> - the more fine-grained configuration options for request handling and
> queuing, server timeouts etc. (added in August due to threading issue) have
> been transferred to the main moses executable.
>
> - the server now pays attention to the xml-input option specified via
> json; the range of accepted values is the same as when specified on the
> command line. I have not written the xml-input handling and do not actively
> use it, so it may or may not work. I don't think there are any regression
> tests that test this right now. Reports from the trenches are welcome.
>
> - mosesserver.cpp is deprecated. It is now merely a shell around the
> regular moses call with --server. I did not remove it from the code base
> entirely, as I assume that there's a plethora of setups out there that rely
> on the existence of mosesserver. What the wrapper does is add --server to
> the options and then call run regular moses.
>
> - anyone adding stuff to mosesserver.cpp from now on owes me a lifetime
> supply of the finest Laphroaig. Just send me a quarter cask every year for
> Burns Nicht for the rest of my life if you do. If I haven't pushed anything
> for two years, you may assume I'm dead.
>
>
> - Uli
>
> On Tue, Nov 10, 2015 at 2:58 PM, Ulrich Germann <[email protected]>
> wrote:
>
>> Hi all,
>>
>> mosesserver is deprecated and should not be used any more. I'll transfer
>> the threading-related changes to the server implementation in the regular
>> moses executable and let you know once I'm done so that other things (like
>> passthrough) can be added. By the looks of it, the changes are fairly
>> straightforward, so it shouldn't take long. However, I can't guarantee that
>> the new server will do everything the old server did, (or do it the same
>> way).
>>
>> It would be fantastic if a few people could design and contribute test
>> cases so that we can do some regression testing for the server. Ideally a
>> test case should provide:
>>
>> - tiny models to work with (or we may be able to recycle some that
>> already exist)
>> - sample input (json)
>> - expected output (json)
>>
>> Cheers - Uli
>>
>>
>>
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
>


-- 
Ulrich Germann
Senior Researcher
School of Informatics
University of Edinburgh
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to