rumbleFTW / rocket-translate

Rocket translate is a blazingly fast translation API written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rocket translate

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.

API Documentation:

  1. Home

    Endpoint:

    GET http://127.0.0.1:8000/
    

    This endpoint provides general information about the API version and status.

  2. Languages

    Endpoint:

    GET http://127.0.0.1:8000/languages
    

    This endpoint provides a list of supported languages.

    Response:

    • languages: An array of language codes.
  3. Translate

    Endpoint:

    POST http://127.0.0.1:8000/translate
    

    Request 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.

About

Rocket translate is a blazingly fast translation API written in Rust.

License:MIT License


Languages

Language:Rust 100.0%