Skip to main content

No project description provided

Project description

Smart Translator

If the intelligent translation feature is enabled and the language of the user text matches the language the user translates into, then the text is automatically translated into the default language

The ability to auto-check the text for errors

Using Smart Translation

from smart_translator import SmartTranslate

translator = SmartTranslate()

print(translator.translate('Привет мир', 'ru'))
>>> Hello World

Checking the spelling of the text

from smart_translator import SmartTranslate

translator = SmartTranslate()

print(translator.auto_spelling('Hillo Wrld', 'ru').spelling_text)
>>> Hello World

Translation of the text corrected from errors

from smart_translator import SmartTranslate

translator = SmartTranslate()

print(translator.auto_spelling('Hillo Wrld', 'ru').result)
>>> Привет, мир

All available languages

from smart_translator import SmartTranslate

print(translator.LANGUAGES)

Translation without using smart translation

from smart_translator import SmartTranslate

translator = SmartTranslate(smart_translation=False)

print((translator.translate('Привет мир', 'ru')))
>>> Привет мир

Default language selection

from smart_translator import SmartTranslate

translator = SmartTranslate(default_language='ru')

print((translator.translate('Hello World', 'en')))
>>> Привет, мир

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

SmartTranslator-1.2.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file SmartTranslator-1.2.tar.gz.

File metadata

  • Download URL: SmartTranslator-1.2.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for SmartTranslator-1.2.tar.gz
Algorithm Hash digest
SHA256 28880ed71f7bb39baaa13d91a5cbd90098202e23360b878acd8425212de7009a
MD5 1cd8e4a5d85e0dd78602e9f07ee7c5c0
BLAKE2b-256 69b55b68c280068c129c3a2e6cd255fdb694eb0032558c8eadeae59ddaf7f747

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