Dear Moses Support Group:
 
              I have read a website in 
  http://www.statmt.org/moses/?n=Moses.AdvancedFeatures#ntoc21
 
  I find one sentence like: 
 "The moses server is now able to load multiple translation systems within the 
same server, and the client is able to decide which translation system that the 
server should use, on a per-sentence basis. The client does this by passing a 
system argument in the translate operation. "
 
I try to develop two translation models in the same Moses Server:
Chinese-to-Portuguese and Chinese-to-English

So I created moses.ini (the attached file) like this:
 
#########################
### MOSES CONFIG FILE ###
#########################

# D - decoding path, R - reordering model, L - language model
[translation-systems]
cp D 0 R 0 L 0
ce D 1 R 1 L 1

# input factors
[input-factors]
0
# mapping steps
[mapping]
0 T 0
1 T 1
# translation tables: source-factors, target-factors, number of scores, file 
[ttable-file]
0 0 5 
/home/tianliang/research/moses-server/scripts/target/scripts-20110125-2256/training/model-chn-port-20110107//phrase-table.gz

0 0 5 
/home/tianliang/research/moses-server/scripts/target/scripts-20110125-2256/training/model-chn-eng-20110103//phrase-table.gz


# no generation models, no generation-file section
# language models: type(srilm/irstlm), factors, order, file
[lmodel-file]
0 0 5 
/home/tianliang/research/moses-server/scripts/target/scripts-20110125-2256/training/model-chn-port-20110107/sample.lm

0 0 5 
/home/tianliang/research/moses-server/scripts/target/scripts-20110125-2256/training/model-chn-eng-20110103/sample.lm



# limit on how many phrase translations e for each phrase f are loaded
# 0 = all elements loaded
[ttable-limit]
20
# distortion (reordering) files
[distortion-file]
0-0 msd-bidirectional-fe 6 
/home/tianliang/research/moses-server/scripts/target/scripts-20110125-2256/training/model-chn-port-20110107//reordering-table.gz

0-0 msd-bidirectional-fe 6 
/home/tianliang/research/moses-server/scripts/target/scripts-20110125-2256/training/model-chn-eng-20110103//reordering-table.gz



# distortion (reordering) weight
[weight-d]
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3

# language model weights
[weight-l]
0.5000
0.5000

# translation model weights
[weight-t]
0.2
0.2
0.2
0.2
0.2
0.2
0.2
0.2
0.2
0.2
# no generation models, no weight-generation section
# word penalty
[weight-w]
-1
-1

[distortion-limit]
6

In the server, I type this command:
./mosesserver -f bigmoses.ini --server-port 9084


In Client, I type this command:
./client.perl

You can find client.perl in the attached file.
The client input Chinese sentence, he wants to get the Portuguese sentence.
How can I choose one translation system from client?
Can you help me? Thanks!

 Best Regards,
                                                                                              
 Fong Pui Chi



      

Attachment: bigmoses.ini
Description: Binary data

Attachment: client.perl
Description: Binary data

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

Reply via email to