Skip to content

torch-transformer-hinglish2hindi-translator is a character-level translater implemented in PyTorch, specifically designed for translating Hinglish (romanized hindi) to Hindi. The translator employs a Transformer-based architecture, leveraging the power of attention mechanisms for accurate and context-aware translation.

Notifications You must be signed in to change notification settings

thefcraft/torch-transformer-hinglish2hindi-translator

Repository files navigation

torch-transformer-hinglish2hindi-translator

torch-transformer-hinglish2hindi-translator is a character-level translater implemented in PyTorch, specifically designed for translating Hinglish (romanized hindi) to Hindi. The translator employs a Transformer-based architecture, leveraging the power of attention mechanisms for accurate and context-aware translation.

Key Features:

  • Character-level translation for Hinglish to Hindi.
  • Transformer-based architecture for improved context understanding.
  • PyTorch implementation for ease of use and extensibility.
  • Trained on a dataset containing Hinglish sentences and their corresponding Hindi translations.
  • Suitable for small to medium-sized translation tasks.

How to Use:

  1. Clone the Repository:

    git clone https://github.com/yourusername/torch-transformer-hinglish2hindi-translator.git
    cd torch-transformer-hinglish2hindi-translator
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Download Pre-trained Model:

    • Download the pre-trained transformer model weights.
    • Save the weights in the models/ directory.
  4. Run the Translator:

    • Use the provided script or integrate the translator into your Python code.
    • Example:
      from translator import Hinglish2HindiTranslator
      # translator = Hinglish2HindiTranslator(model_path='model/hinglish2hindi_oneHot_epoch-50.pth.tar', model_type_oneHot=True)
      translator = Hinglish2HindiTranslator(model_path='model/hinglish2hindi_epoch-50.pth.tar', model_type_oneHot=False)
      translation = translator.translate("mera naam laksh kumar sisodiya hai")
      print(f"Translation: {translation}") # ->  मेरा नाम लक्ष कुमर सिसोदिया है
  5. Fine-tuning (Optional):

    • Fine-tune the model on your specific dataset by modifying the training script and providing your dataset.

Contributions:

Contributions are welcome! Feel free to submit pull requests, report issues, or contribute to the project's improvement. Whether you're a beginner or an experienced developer, your contributions can help enhance the translator's features and performance.

Disclaimer:

This translator is intended for educational and small to medium-sized translation tasks. It may not perform optimally on large-scale and domain-specific datasets.

Feel free to customize the repository name and description to better fit your vision for the project. Adjust the paths and commands based on your specific setup and system.

About

torch-transformer-hinglish2hindi-translator is a character-level translater implemented in PyTorch, specifically designed for translating Hinglish (romanized hindi) to Hindi. The translator employs a Transformer-based architecture, leveraging the power of attention mechanisms for accurate and context-aware translation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published