Skip to main content

A package for translating text and detecting languages

Project description

XTranslator

XTranslator is a package that allows you to detect the language of a given text and translate it into various languages. With its simple and intuitive interface, you can easily integrate language detection and translation capabilities into your applications.

Installation

To install XTranslator, simply run the following command:

pip install xtranslator

Usage

To use XTranslator in your project, follow these steps:

  1. Import the XTranslator package into your code:
import xtranslator
  1. Detect the language of a text:
from xtranslator import detect
text = "Hello, my nam is XTranslator"
detector = "fasttext"
print(detect(text, detector))
  1. Translate text into another language:
from xtranslator import translate
text = "Hello, world!"
translator = "google"
model_name = "google"
dest_language = "sk"
detector = "fasttext"
print(translate(text, dest_language, translator, model_name, detector))

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request on the GitHub repository.

License

XTranslator is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xtranslator-0.0.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xtranslator-0.0.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file xtranslator-0.0.1.tar.gz.

File metadata

  • Download URL: xtranslator-0.0.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for xtranslator-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1b8058e34a5db6a51ed6ddd8c00ae2053e3f993cadc23c111292d289e475d85e
MD5 a634cb2ec89328f24d517ce9aca7c140
BLAKE2b-256 201dea566ef2cacf18b626c6337d6d6a323295410844841cd24dd495fd767ef2

See more details on using hashes here.

File details

Details for the file xtranslator-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: xtranslator-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for xtranslator-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e19011b1fc693943cf4e6c06356ef8549dc2d10d72d8cfef6cde8ecdc111f04
MD5 179e7c24c9d18975a88aa50d0dae0a05
BLAKE2b-256 58c9386ede6cc9dbe83f4b8a5a5fb500d17240758756296c4e28c2ced3f467cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page