Hi Shubham There is not necessarily a need to start several server processes running on different ports. A Moses server can serve more than one client at the same time, except when the "serial" option is used explicitly. For other useful server options, see e.g. :
https://github.com/moses-smt/mosesdecoder/blob/master/moses/Parameter.cpp#L219 Parallelization has to kick in in another place, namely in your client code that requests the translations. One solution is to use multithreading to submit several requests at the same time and, of course, also do the pre- and postprocessing in parallel. You did not really explain to us how exactly you are requesting translations from the server, though. Also, this part of your message: *"... as splitting a single sentence to multiple group of sentence and then translate them on different ports separately, can give different meaning rather than translate the whole single sentence at single port."* Is a bit confusing. Currently, decoding always happens sentence-by-sentence and there is no document context. So, documents can safely be translated sentence by sentence. If you mean splitting a single sentence into words and send those to different Moses servers, then yes, that's a bad idea. At any rate, your questions are very vague and general and it is difficult to give specific advice. Regards, Mathias — Mathias Müller AND-2-20 Institute of Computational Linguistics University of Zurich Switzerland +41 44 635 75 81 [email protected] On Wed, Dec 28, 2016 at 8:23 PM, Shubham Khandelwal <[email protected]> wrote: > Hello, > > As mosesserver accepts only one sentence at a time. So I am creating one > another component in front of mosesserver to handle tokenisation, casing > and splitting taking care of parallelisation. > > Following is my procedure to do it, let me know whether am I heading > correctly or not to do this: > *---* > *So suppose, if I have 5 different sentences (as a paragraph) to translate > at once (fr-en). So I will be creating mosesserver on 5 different ports > firstly and pass those 5 different sentences after doing parallely > tokenisaton, casing and splitting on those different ports and then > concatenate the output after recasing and detokenisation parallely. * > *--* > Let me know whether this is correct or not ? If no, then please suggest me > better solution to do this. > > Also, I have one more question in this that if a sentence is composed of > around 10 words. Then when I pass this sentence to translate as follows: > -> ~/mosesdecoder/bin/mosesserver -f moses.ini -threads 16 -b 0.000000001 > > then it takes around 10 seconds to translate. To make it fast, I can run > this on different ports but that is not a good idea I think, as splitting a > single sentence to multiple group of sentence and then translate them on > different ports separately, can give different meaning rather than > translate the whole single sentence at single port. > So basically, my doubt is how to make better splitting in such cases which > can take care of parallelisation aswell ? > > -- > Yours Sincerely, > > Shubham Khandelwal > > _______________________________________________ > 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
