Giter Site home page Giter Site logo

pythontranslator's Introduction

Translator Bot

Translator Bot is a Python script designed to assist users in translating frequently occurring sentences within a document. It is essential to note that this tool is not an AI translator. Instead, it operates based on a manually created data source, allowing users to replace specific sentences or phrases with their corresponding translations.

Features

  • Data Source: Users provide a manually created data source that includes pairs of sentences in their preferred languages (e.g., English to Farsi).

  • Non-AI Translation: Translator Bot doesn't use artificial intelligence for translation. It simply scans the document for matches and replaces the sentences based on the provided data source.

  • Customizable Language Pairs: Translator Bot is set by default for English to Farsi translation. Users can customize it for their choice of languages by adjusting the column names in the code.

  • Case-Insensitive Matching: Translator Bot performs case-insensitive matching, ensuring that translations are found regardless of letter case.

Usage

  1. Set up your Data Source: Create an Excel file with two columns, one for sentences in your preferred source language and the other for their translations. Save it in as 'DataSource.xlsx' in the script's directory.

  2. Run the Script: Execute the script, providing the path to the document you want to translate.

  3. Review the Output: The translated document is saved with the prefix 'Translated_' in the same directory as the original document.

Dependencies

  • Python
  • pandas
  • docx

Project Status: Please note that this project is currently unfinished and may receive gradual updates. Feel free to submit pull requests and add your insights to the project.

Example Data Source

English Sentence Farsi Translation
This is a test. این یک آزمایش است.
Please provide your name. لطفاً نام خود را وارد کنید.

Important Note

Translator Bot is not an AI-based translator. It does not perform real-time translation but replaces sentences based on the provided data source. It is a handy tool for users who have a predefined set of sentences that need consistent translation within their documents.

Customization: By adjusting the column names in the code, users can customize Translator Bot for their choice of languages.

Feel free to contribute to this project, suggest improvements, or report issues.

License

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

P.S: The project is unfinished and might get gradual updates. feel free to submit pull requests and add your insights to the project.

pythontranslator's People

Contributors

amirjahednia avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.