[小ネタ] Google Chrome翻訳の語順を修正する便利なプラグインを紹介

Explores Google Translate’s Japanese translation issues for tech documents and suggests using the CodeToSpan Chrome extension for smoother translations.

A flat, simple style illustration of a hardworking engineer sitting at a desk, looking confused while reading technical documents on a computer screen. A large question mark floats above their head, indicating confusion. Next to the computer is a cup of coffee, and a seasonal flower is placed for decoration. The design is minimalist, with soft, muted colors and a wide aspect ratio, creating a calm and focused atmosphere. Illustrated by ChatGPT and DALL-E.

相模原市で IoT 設計を受託しているファームロジックスです。

今回も小ネタです。以前にこちらで書かせて頂いたように、ウェブブラウザによる日本語自動翻訳は極めて便利な機能です。Google Chrome であれば標準で利用できますし(間違っていたらごめんなさい)、Mozilla Firefox でも、To Google Translate という拡張機能により、Google Translate を利用してウェブサイトの自動翻訳ができます。

Google Translate 日本語変換の語順の問題

しかし、ソフトウェア技術関連の方であれば、この Google Translate に問題があることを御存知かと思います。例えば、以下のようなテキストを翻訳します。(PyTorch のチュートリアルより引用。)

“We pass the Dataset as an argument to DataLoader.”

すると、次のようにおかしな語順になってしまいます。

Datasetを引数として に渡しますDataLoader。”

通常の英文であれば良いのでしょうが、ソフトウェア技術関係のウェブページを見ていると、このような問題が頻繁に起きるので、非常に疲れることになります。

原因と対策

ネットで調べたところ、こちらの方のサイトに説明がありました。原因は、Google Translate が <code> タグをうまく扱えないことにあるようです。そして、そのサイトの方が Google Chrome 用の便利な拡張機能を公開していらっしゃいました。

これは極めて便利で助かります。拡張機能を公開して頂いた devInui さん、どうもありがとうございます!

コメントを残す