nprogram’s blog

気ままに、プログラミングのトピックについて書いていきます

2023-07-01から1ヶ月間の記事一覧

Google Cloud Translationを用いて、各言語に同時に翻訳実行します

翻訳の自動化について 翻訳の自動化はGoogle Cloud Translation以外には、DeepLのAPIを用いることも可能です Google Translate Sample # Imports the Google Cloud Translation library from google.cloud import translate import pandas as pd # Initializ…

Google Cloud Vision API

Google Cloud Visionの設定について Cloud Vision の設定とクリーンアップ Google Cloud Vision APIサンプルコード 画像から文字列を抽出して、実際に取り出してきた値と期待値を比較して類似度を求めます import io import os import difflib from google.c…

Python + TesseractでOCR

はじめに PythonとTesseractでOCRを実施しようとした場合は、日本文字列をそのままOCRに書けるとあまり精度が出ません。 import os from PIL import Image from PIL import ImageEnhance import pyocr import cv2 import difflib def start_setting(): TESSE…