Rocket-translate is a blazingly fast API for translation written in Rust rocket and rust-bert, It uses T5 checkpoints behind the stage, which can be replaced by any NLP pipeline supported by rust-bert.
-
Endpoint:
GET http://127.0.0.1:8000/This endpoint provides general information about the API version and status.
-
Endpoint:
GET http://127.0.0.1:8000/languagesThis endpoint provides a list of supported languages.
Response:
languages: An array of language codes.
-
Endpoint:
POST http://127.0.0.1:8000/translateRequest body: Content-Type: raw (text) Example:
{ "source_lang": "English", "target_lang": "French", "text": "This text will be translated to French" }Response:
The response will include details about the translation:
success: A boolean indicating whether the translation was successful.source_language: The detected or specified source language.target_language: The specified target language.original_text: The original text that was translated.translated_text: The translated text.