
[파이썬] Ch.5 (2) 광학 문자 인식 + DeepL API 번역
·
Python
API 서비스를 사용하면 DeepL에 직접 접속하지 않고도 번역 기능을 이용할 수 있다. import deeplDEEPL_KEY = "제 API KEY는 비밀입니다"tran = deepl.Translator(DEEPL_KEY)resp = tran.translate_text( "Hello, World", source_lang = "EN", target_lang = "KO")resp.text from pathlib import Pathimport deeplfrom step_1 import IN_DIRfrom step_2_2 import read_textdef read_text_translated(path: Path) -> list : text_list = read_text(path) # 문자 인..




