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

Uploaded Source

File details

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

File metadata

  • Download URL: SmartTranslator-1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e1018702e6fd3928efe91c93d5be9166c56e3f721f710e47de8c63d1424edd28
MD5 df3ed47579516a672968242f78c9a034
BLAKE2b-256 a0b8737feb06fdae01cb625478e795d865715a598ec6878df1f9cbae6029087f

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