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.3.tar.gz (2.3 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for SmartTranslator-1.3.tar.gz
Algorithm Hash digest
SHA256 ef4ef875a535b63daa56bc899d3d966e16feb51d7e4a148b283781a03e3c13d6
MD5 b524668fa256bf95db16bc04d15668c5
BLAKE2b-256 0f35543bd7f4e3c0bab780e007c6730f81c0fbac9a8c814cea7ec0dd8563f9e8

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