selenium を docker 上で動かす
英語論文を自動翻訳するプログラム
- 記事
https://qiita.com/ryoheiszk/items/93b2d52eec370c09a22e - コード
https://github.com/ryoheiszk/python-selenium-on-docker
./build.shもしくは
docker-compose build --no-cache
docker-compose up -d
docker-compose exec app bash- text/english.txt に文章を貼り付ける
- 改行文字などを整形するプログラム(auto_n)を実行する
python3 source/auto_n.py
- text/result.txt の自動整形ファイルを目視で確認する(改行が不適切な場合は手動で編集)
- Selenium で text/result.txt にある本文を一行づつ翻訳
python3 source/translate.py
- text/english.txt
## Abstract Here is the text of the abstract. The auto_n program will automatically format the text even if it contains line breaks in the middle of the text. ## 1. Introduction Here is the text of the introduction. ## 2. Chapter Title This is the test. ### 2-1. Chapter Sub Title This is the sub test. - text/format.txt
## Abstract Here is the text of the abstract. The auto_n program will automatically format the text even if it contains line breaks in the middle of the text. ## 1. Introduction Here is the text of the introduction. ## 2. Chapter Title This is the test. ### 2-1. Chapter Sub Title This is the sub test. - text/translate.txt
## Abstract 1. Here is the text of the abstract. - ==抄録の本文です。== 2. The auto_n program will automatically format the text even if it contains line breaks in the middle of the text. - ==auto_nプログラムは、テキストの途中に改行が含まれていても、自動的にフォーマットします。== ## 1. Introduction 1. Here is the text of the introduction. - ==ここでは、その紹介文をご紹介します。== ## 2. Chapter Title 1. This is the test. - ==これがテストです。== ### 2-1. Chapter Sub Title 1. This is the sub test. - ==これがサブテストです。==
- HackMD