Logo

gptwntranslator

A simple python package to translate web novels using OpenAI's GPT models' API.

Get Started

About

gptwntranslator is a web novel translation tool that utilizes OpenAI's GPT models to provide okay-ish/medium-quality translations of mainly Japanese web novels. The tool uses web scraping to extract the original text, translates it with the help of AI models, and then generates an epub file for easy reading.

Capabilities

  • Scraping web novels from multiple sites.
  • Translating Japanese text using OpenAI's advanced AI models.
  • Translation from and to multiple languages.
  • Generating epub files for the translated content.
  • Customizable translation by specifying chapters or sub-chapters.
  • Selection of AI models to use for translation.
  • Optimization of API calls to OpenAI's API.
  • Mix and match of AI models for the various steps of the translation process.
  • Parallelization of the translation process for faster translations.
  • Caching of scraped web novels to avoid unnecessary scraping.
  • Caching of translated text to avoid unnecessary API calls.
  • Exporting / importing of cached data for easy sharing and editing.

Translation Quality

This tool by no means provides a perfect translation. And does not offer any guarantees on its quality.

All translation is done by OpenAI's GPT models. The quality of the translation depends on the model used, on the model's ability to understand the language, and a bit of luck. As of now, the tool supports the following models: GPT-3.5, GPT-4 8k, GPT-4 32k. The jump in quality from 3.5 to 4 is noticeable, but it's 15 times as expensive as 3.5.

Translation quality itself can also vary if retrying the translation even with the same models. The same input will not always produce the same output. The tool tries to use several techniques to mitigate this, but it's not perfect.

The tool will also be able to use any other model that OpenAI releases in the future, assuming it uses the same API endpoints.

Disclaimer

This tool is not affiliated with OpenAI in any way. Nor is it endorsed by OpenAI. It is just an experiment to see how well OpenAI's GPT models can be used for translation. It works as an interface to OpenAI's API, while just automating some of the steps. Everything that this tool does can be done manually, with copy and paste, and a bit of patience.


Copyright © 2023 Rodrigo Jauregui | Licensed under GPL v3.0 | Privacy Policy