Thank you for your reply. 

I've tried your suggestion and flush the output stream, the one which gives 
moses command its input, before closing, but it still doesn't produce any 
result. Any other idea? :)
 
--
Simon H S --
Simon H S



________________________________
 From: Lane Schwartz <[email protected]>
To: Simon <[email protected]> 
Cc: [email protected] 
Sent: Wednesday, 11 January 2012, 23:48
Subject: Re: [Moses-support] can't find moses translation result from java app
 
On Tue, Jan 10, 2012 at 4:53 PM, Simon <[email protected]> wrote:
> Dear all,
>
> I'm trying to call moses from inside java application, but after running the
> Runtime.exec, I can't retrieve the translation result using getInputStream
> method or the getErrorStream.
>
> I'm pretty certain that the moses has produced some translation, because in
> the error stream I can read something like:
> ...
> ERR>Finished loading phrase tables : [0.000] seconds
> ERR>IO from STDOUT/STDIN
> ERR>Created input-output object : [0.000] seconds
> ...
>
> but as I said before, I can't find the translation result when running the
> moses from inside the Java application. Running it directly from shell works
> fine.
>
> Can anyone help? the code I'm using and the full result of error stream is
> in this pastebin:
> http://pastebin.com/Z7Y3NsTU
>

You could try forcing the stream object to flush.

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

Reply via email to