我正在尝试使用以下代码将 2 个大文件从西班牙语翻译成英语:import goslate
big_files = ['lenin.txt', 'liga.txt']
gs = goslate.Goslate()
translation = []
for big_file in big_files:
with open(big_file, 'r') as f:
translated_lines = []
for line in f:
translated_line = gs.translate(line, "en")
translated_lines.append(translated_line)
translation.append('\n'.join(translated_lines))
我收到此错误:
文件“C:\Anaconda\lib\urllib\request.py”,第 590 行,在 http_error_default 中引发 HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError:服务不可用