Skip to main content

Google traduction

Project description

PyPI latest PyPI License Stars

IronTranslator is a simple tool to translate words or paragraphs with lengths less than 5000 words. IronTranslator may help you to do multiple tasks in nlp machine learning projects (in ordre to use GloVe or FastText).

Compatible with Python 3.6+.

1 - Installation

You can install it from PyPI.

$ pip install IronTranslator

2 - How to use IronTranslator ?

First you have to download the latest version of ChromeDriver. Save the download file in the directory of your choice.

On Windows

>>> YourChromeDriverPath = r"C:\Users\chromedriver"

On Mac

>>> YourChromeDriverPath = "/Users/chromedriver"

Single sentence translation

>>> from IronTranslator import Translator
>>> translator = Translator(ChromeDriverPath = YourChromeDriverPath)
>>> translator.translate(texts=["bonjour"], dest='ko')
100%|██████████████████████████████████████████████████| 1/1 [00:05<00:00,  0.70/it]
['안녕하세요']

Multiple sentence translation

>>> from IronTranslator import Translator
>>> translator = Translator(ChromeDriverPath = YourChromeDriverPath)
>>> translator.translate(texts=["I Love Python.","The gravity on the moon's surface is 1.622 m / s2","What is the speed of light in a vacuum?"], dest='de')
100%|██████████████████████████████████████████████████| 3/3 [00:05<00:00,  3.59s/it]
['Ich liebe Python.','Die Schwerkraft auf der Oberfläche des Mondes beträgt 1,622 m / s2',
'Was ist die Lichtgeschwindigkeit im Vakuum?']

We can specify the source language

>>> from IronTranslator import Translator
>>> translator = Translator(ChromeDriverPath = YourChromeDriverPath)
>>> translator.translate(texts=["I Love Real Madrid.","The gravity on the moon's surface is 1.622 m / s2",
                                "What is the speed of light in a vacuum?"], dest='es',src='en')
100%|██████████████████████████████████████████████████| 3/3 [00:05<00:00,  1.69s/it]
['Amo al Real Madrid.','La gravedad en la superficie de la luna es de 1.622 m / s2.','¿Cuál es la velocidad de la luz en un vacío?']

Available Languages :

>>> {'afrikaans': 'af',
    'albanian': 'sq',
    'amharic': 'am',
    'arabic': 'ar',
    'armenian': 'hy',
    'azerbaijani': 'az',
    'basque': 'eu',
    'belarusian': 'be',
    'bengali': 'bn',
    'bosnian': 'bs',
    'bulgarian': 'bg',
    'catalan': 'ca',
    'cebuano': 'ceb',
    'chichewa': 'ny',
    'chinese (simplified)': 'zh-cn',
    'chinese (traditional)': 'zh-tw',
    'corsican': 'co',
    'croatian': 'hr',
    'czech': 'cs',
    'danish': 'da',
    'dutch': 'nl',
    'english': 'en',
    'esperanto': 'eo',
    'estonian': 'et',
    'filipino': 'tl',
    'finnish': 'fi',
    'french': 'fr',
    'frisian': 'fy',
    'galician': 'gl',
    'georgian': 'ka',
    'german': 'de',
    'greek': 'el',
    'gujarati': 'gu',
    'haitian creole': 'ht',
    'hausa': 'ha',
    'hawaiian': 'haw',
    'hebrew': 'he',
    'hindi': 'hi',
    'hmong': 'hmn',
    'hungarian': 'hu',
    'icelandic': 'is',
    'igbo': 'ig',
    'indonesian': 'id',
    'irish': 'ga',
    'italian': 'it',
    'japanese': 'ja',
    'javanese': 'jw',
    'kannada': 'kn',
    'kazakh': 'kk',
    'khmer': 'km',
    'korean': 'ko',
    'kurdish (kurmanji)': 'ku',
    'kyrgyz': 'ky',
    'lao': 'lo',
    'latin': 'la',
    'latvian': 'lv',
    'lithuanian': 'lt',
    'luxembourgish': 'lb',
    'macedonian': 'mk',
    'malagasy': 'mg',
    'malay': 'ms',
    'malayalam': 'ml',
    'maltese': 'mt',
    'maori': 'mi',
    'marathi': 'mr',
    'mongolian': 'mn',
    'myanmar (burmese)': 'my',
    'nepali': 'ne',
    'norwegian': 'no',
    'odia': 'or',
    'pashto': 'ps',
    'persian': 'fa',
    'polish': 'pl',
    'portuguese': 'pt',
    'punjabi': 'pa',
    'romanian': 'ro',
    'russian': 'ru',
    'samoan': 'sm',
    'scots gaelic': 'gd',
    'serbian': 'sr',
    'sesotho': 'st',
    'shona': 'sn',
    'sindhi': 'sd',
    'sinhala': 'si',
    'slovak': 'sk',
    'slovenian': 'sl',
    'somali': 'so',
    'spanish': 'es',
    'sundanese': 'su',
    'swahili': 'sw',
    'swedish': 'sv',
    'tajik': 'tg',
    'tamil': 'ta',
    'telugu': 'te',
    'thai': 'th',
    'turkish': 'tr',
    'ukrainian': 'uk',
    'urdu': 'ur',
    'uyghur': 'ug',
    'uzbek': 'uz',
    'vietnamese': 'vi',
    'welsh': 'cy',
    'xhosa': 'xh',
    'yiddish': 'yi',
    'yoruba': 'yo',
    'zulu': 'zu'}

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

IronTranslator-1.0.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

IronTranslator-1.0.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file IronTranslator-1.0.3.tar.gz.

File metadata

  • Download URL: IronTranslator-1.0.3.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for IronTranslator-1.0.3.tar.gz
Algorithm Hash digest
SHA256 67a0d140c9d6eb807d56010adbd0d3d72b9eb622db8bfac7576961b62b174f16
MD5 a02613e536c74abbfd5fe4e6d038e988
BLAKE2b-256 c9143183945f48b953bfb284b5c4e77a0061c3d3558ea534ed6b3652843d4cc2

See more details on using hashes here.

File details

Details for the file IronTranslator-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: IronTranslator-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for IronTranslator-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 51d449dbb4aca94406a3f3bcd3384ce5e0e74de5d11d9c7e7c9ad1dd8a748563
MD5 084e867f86bf7a821dd3618303ff1eb4
BLAKE2b-256 f69828778ec83378ebd6a93398a81887d9d40fac01b2c4db4b901871d69a47fa

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