(O+P)ut

アウトプット



(O+P)ut

エンジニアのアウトプット

Google翻訳で翻訳ループをさせてみた

スポンサーリンク

Google翻訳で翻訳ループ

パキスタン人の方とメールする機会があり、Google翻訳を使って現地の言葉である「ウルドゥ語」で文章を書いたりしていました。
その際、Google翻訳で返してきた翻訳結果が正しい意味になっているのかを確認するため翻訳結果をさらに日本語に再翻訳して確認していました。
f:id:mtiit:20171208153335p:plain

このループを繰り返せば、いつか収束するはずですので、その収束にいたるまでの経緯をいくつかの日本語⇔英語の例文を使って確認してみたいと思います。
完全なる興味本位です。




試してみた

簡単な文章「今日はいい天気ですね。」

今日はいい天気ですね。

It's nice weather today, is not it.

今日はいい天気ですね。

1回の往復で収束しました。完璧な翻訳ですね。

普通の文章「ちょっと待ってください。もう少しゆっくり話していただけますか。」

ちょっと待ってください。もう少しゆっくり話していただけますか。

wait a minute. Could you speak a little more slowly?

ちょっと待って。 あなたは少しゆっくりと話すことができますか?

Wait a minute. Can you speak a little slowly?

ちょっと待って。 あなたは少しゆっくり話すことができますか?

Wait a minute. Can you speak a little slowly?

2.5回の往復で収束しています。"ゆっくり" に 「と」があるか無いかの違いで1往復していますね。こうなると、少し文章を長くすると往復がさらに増えそうです。

難しい文章「日本は周りが海で囲まれた島国であり、飛行機のなかった時代には、外国と行き来するには、船を使うしかありません。」

日本は周りが海で囲まれた島国であり、飛行機のなかった時代には、外国と行き来するには、船を使うしかありません。

Japan is an island country surrounded by the ocean, and in the era when there was no airplane, there is no choice but to use a ship to get in and out of a foreign country.

日本は海に囲まれた島国であり、飛行機がない時代には、外国に出入りするために船を使う以外に選択肢はありません

Japan is an island country surrounded by the sea, and there is no choice other than using a ship to enter and leave the foreign country in times without airplanes.

日本は海に囲まれた島国であり、航空機を持たずに外国に出入りするために船を使う以外に選択肢はない。

Japan is an island country surrounded by the ocean, there is no option other than using a ship to enter and leave the country without having an aircraft.

日本は海に囲まれた島国であり、飛行機を持たずに出入国するために船を使う以外に選択肢はない。

Japan is an island country surrounded by the sea, there is no choice other than to use a ship to enter and leave without having an airplane.

日本は海に囲まれた島国であり、飛行機を持たずに出入りするために船を使う以外に選択肢はありません。

Japan is an island country surrounded by the ocean, there is no choice but to use a ship to get in and out without having an airplane.

日本は海に囲まれた島国であり、飛行機を持たずに出入りするには船を使うしかありません

Japan is an island country surrounded by the sea, and there is no choice but to use a ship to get in and out without having an airplane.

日本は海に囲まれた島国であり、飛行機を持たずに出入りするには船を使うしかありません。

6往復です。本当に、微妙な違いでくるくるしています。ただ、どんどん難しい言い回しをカットするように変化しているようにも見えます。

ただ、1度目の翻訳結果、

Japan is an island country surrounded by the ocean, there is no option other than using a ship to enter and leave the country without having an aircraft.

と、収束結果での翻訳結果、

Japan is an island country surrounded by the sea, and there is no choice but to use a ship to get in and out without having an airplane.

が、あまり大きな差がないところを見ると、Google翻訳は優秀だな、と感心してしまいます。

ここのループをAPIを用いて実装すると、またおもしろそうですが、それはまた別の機会があればやってみようと思います。以上です。