mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-28 14:32:38 +03:00
The client.perl example now tests the report-all-factors option
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3957 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
a8adc0d6f7
commit
3e69fc929a
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
#
|
#
|
||||||
# Sample client for mosesserver, illustrating allignment info
|
# Sample client for mosesserver, illustrating allignment info and
|
||||||
|
# report all factors
|
||||||
#
|
#
|
||||||
|
|
||||||
use Encode;
|
use Encode;
|
||||||
@ -16,7 +17,7 @@ $text = "il a souhaité que la présidence trace à nice le chemin pour l' aveni
|
|||||||
# Work-around for XMLRPC::Lite bug
|
# Work-around for XMLRPC::Lite bug
|
||||||
$encoded = SOAP::Data->type(string => Encode::encode("utf8",$text));
|
$encoded = SOAP::Data->type(string => Encode::encode("utf8",$text));
|
||||||
|
|
||||||
my %param = ("text" => $encoded, "align" => "true");
|
my %param = ("text" => $encoded, "align" => "true", "report-all-factors" => "true");
|
||||||
$result = $proxy->call("translate",\%param)->result;
|
$result = $proxy->call("translate",\%param)->result;
|
||||||
print $result->{'text'} . "\n";
|
print $result->{'text'} . "\n";
|
||||||
if ($result->{'align'}) {
|
if ($result->{'align'}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user