• Skip to main content
  • Skip to primary sidebar

学習記録

Googleトランスで翻訳

2022年9月1日 by 河副 太智 Leave a Comment

Googleトランスにおいては謎のエラーが発生してうまく動かなかったが、
google_trans_newを使用してから翻訳できるようになった。

①pip install google-trans-new
でインストール

➁C:\Users\xxx\AppData\Local\Programs\Python\Python310\Lib\site-packages\google_trans_newを開く

enter image description here

③151行目のresponse = (decoded_line + ‘]’) を
response = decoded_lineに変える

④以下のコードを実行

1
2
3
4
from google_trans_new import google_translator
translator = google_translator()  
translate_text = translator.translate('요소로',lang_tgt='en')
print(translate_text)

これでgoogle翻訳が使用可能になった2022/9/1現在

このエントリーをはてなブックマークに追加

Tweet
[`yahoo` not found]
このエントリーを Google ブックマーク に追加
LinkedIn にシェア
LINEで送る


Filed Under: python3, スクレイピング

Reader Interactions

コメントを残す コメントをキャンセル

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Primary Sidebar

カテゴリー

  • AWS
  • Bootstrap
  • Dash
  • Django
  • flask
  • GIT(sourcetree)
  • Plotly/Dash
  • VPS
  • その他tool
  • ブログ
  • プログラミング
    • Bokeh
    • css
    • HoloViews
    • Jupyter
    • Numpy
    • Pandas
    • PosgreSQL
    • Python 基本
    • python3
      • webアプリ
    • python3解説
    • scikit-learn
    • scipy
    • vps
    • Wordpress
    • グラフ
    • コマンド
    • スクレイピング
    • チートシート
    • データクレンジング
    • ブロックチェーン
    • 作成実績
    • 時系列分析
    • 機械学習
      • 分析手法
      • 教師有り
    • 異常値検知
    • 自然言語処理
  • 一太郎
  • 数学
    • sympy
      • 対数関数(log)
      • 累乗根(n乗根)
    • 暗号学

Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · Log in