GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - janvarev/OneRingTranslator: One local API for multiple translators. Plugins. Automatic calculate BLEU/COMET metrics of translation quality.

BranchesTags
Open more actions menu

Latest commit

 

History

103 Commits
103 Commits

Folders and files

NameName
Last commit message
Last commit date
cache
cache
 
 
docs_md
docs_md
 
 
plugins
plugins
 
 
webapi_client
webapi_client
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
jaa.py
jaa.py
 
 
oneringcore.py
oneringcore.py
 
 
requirements-bleu.txt
requirements-bleu.txt
 
 
requirements-offline.txt
requirements-offline.txt
 
 
requirements.txt
requirements.txt
 
 
run_cmdline.py
run_cmdline.py
 
 
run_estimate_bleu.py
run_estimate_bleu.py
 
 
run_webapi.py
run_webapi.py
 
 

Repository files navigation

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

  • Supported translators
  • Known OneRingTranslator usages
  • Install and run
  • Base settings and plugin logic
  • Plugins options
  • REST API usage examples
  • Benchmarks (BLEU, COMET) for plugins translation quality Use it to choose what plugin you want to run for your own translation task. Also you can do your own measures with script here.

Known supported translators

Online

  • Google Translate (free)
  • Deepl Translate (require API key)
    • Alt version that doesn't 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)
    • Also support CTranslate2 realization of neuronet
  • 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

  • https://github.com/HIllya51/LunaTranslator - automatic game translation tool
  • https://github.com/janvarev/multi_translate - oobabooga/text-generation-webui plugin for translate conversation with LLM (Large Language Models) UserLanguage<->English
  • https://github.com/janvarev/privateGPT - privateGPT multilanguage fork
  • You can use it with https://github.com/translate-tools/linguist Web browser translation to translate web pages
    • You'll need to add custom translator with this JS code: https://gist.github.com/janvarev/314b13e4d44d5a0cc349385ee85a4f58
  • https://github.com/SillyTavern/SillyTavern - multi-LLM frontend

Thanks to

https://github.com/jenil/chota Chota project for awesome CSS

About

One local API for multiple translators. Plugins. Automatic calculate BLEU/COMET metrics of translation quality.

Resources

Readme
MIT license
Activity

Stars

147 stars

Watchers

4 watching

Forks

16 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.