Skip to content

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

License

Notifications You must be signed in to change notification settings

rumbleFTW/rocket-translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages