WEB API for translation
Simple WEB API REST service for translation.
Features:
- Plugin support. If you misses some translation engine, you can add it yourself!
- Full offline translation (optionally). You can setup your own offline https://github.com/LibreTranslate/LibreTranslate service and target this service to use it as endpoint. Or use effective FB NLLB neuronet.
- Ready to use. By default use Google Translate service, and ready to use.
- Simple REST API interface throw FastApi and openapi.json interface. After install go to
http://127.0.0.1:4990/docs
to see examples.
- API keys. (Disabled by default) You can restrict access to your service by set up a list of API keys, needed to access the service.
- Cache translations (if necessary)
- Automatic BLEU and COMET estimation of translation quality
- If you want to test different plugins translation quality on your pair of languages - you can do it! (Supported over 100 languages from FLORES dataset)
- If you have your own plugin - you can compare it with others!
- Unique World Best results by multi_sources plugin!
- We have a plugin that gains translations from multiple sources, then estimate them and return only the best
- It gains the best COMET translation evaluation score against other plugins.
- Translation routing Use different translation engines on different language pairs.
Links
Known supported translators
Online
- Google Translate (free)
- Deepl Translate (require API key)
- Libre Translate (online free, but slow)
- OpenAI Chat interface (ChatGPT, GPT-4), (online or offline emulation)
- API key required, if you want to connect to OpenAI servers
- Otherwise, you can connect through this interface to local OpenAI emulation servers.
- Yandex translation (through browser manipulation)
- Lingvanex
- Translation via VseGPT LLM online models (require API key):
- ChatGPT
- GPT-4
- Claude Instant v1
- Claude v2
- Google: PaLM 2 Bison
Offline
- Libre Translate (online or offline)
- FB NLLB neuronet (offline)
- FB MBart50 (imho worser then NLLB)
- KoboldAPI endpoint (offline mostly due to target localhost)
- KoboldAPI is a REST interface for lots of LLM servers (like koboldcpp, text-generation-webui)
- If you load some LLM model inside this LLM server, you can translate texts using them!
- (Now plugin uses Alpaca template to set translation task. Change it if you want)
- OpenAI Chat interface (ChatGPT), (online or offline emulation)
- API key required, if you want to connect to OpenAI servers
- Otherwise, you can connect through this interface to local OpenAI emulation servers.
- No Translate (offline) - dummy translator to compare with
- Opus MT
- Bloomz (https://huggingface.co/bigscience/bloomz-1b7)
Synthetic
- multi_source - get translations from other plugins, and choose the best one
- use_mid_lang - translate with other plugins by chaining translating to middle-language, usually English (FromLang->En->ToLang)
Known usages
Thanks to
https://github.com/jenil/chota Chota project for awesome CSS