Skip to content

This Repository provides the functionality to translate sentence present in one language to another.(English to Hindi)

License

Notifications You must be signed in to change notification settings

srijan14/text-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Translator

This project provide a python package along with pre-trained models to perform machine translation on text

Getting Started

Below instructions will get you a copy of the project up and running your local machine for development and testing purposes.

Prerequisites

python>=3.6

Installing

pip install text-translator

Usage

  1. Loading Library

    from translator import Translator
    translator = Translator()
    
  2. Model Loading(Pretrained models for multiple language conversion can be found here)

    translator.load_model(MODEL_PATH)
    
  3. Prediction

    
    # translator.translate(text,verbose=True)
    # Return : list containing translated text
    # prints results on console if verbose set to True
    
    translator.translate("What is your name?",verbose=True)
    आपका नाम क्या है?
    
    translator.translate(["What is your name?","What is your age?"])
    आपका नाम क्या है?
    आपकी उम्र क्या है?
    

Authors

License

This project is licensed under the Apache License - see the LICENSE.md file for details

Acknowledgments

About

This Repository provides the functionality to translate sentence present in one language to another.(English to Hindi)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages