机器翻译
英语 | 意大利语 |
---|---|
你好!你怎么样? | 嗨,你好吗? |
我今天升职了 | 我今天升职了! |
今天过得不好 | 我今天感觉不舒服 |
ludwig experiment \
--dataset translation.csv \
--config config.yaml
使用 config.yaml
input_features:
-
name: english
type: text
encoder:
type: rnn
cell_type: lstm
reduce_output: null
preprocessing:
tokenizer: english_tokenize
output_features:
-
name: italian
type: text
decoder:
type: generator
cell_type: lstm
attention: bahdanau
reduce_input: null
loss:
type: softmax_cross_entropy
preprocessing:
tokenizer: italian_tokenize
trainer:
batch_size: 96