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.5.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.5-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: IronTranslator-1.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 e1a54789e499200165529731eba2d21cdca2b515f2764e8546aa0228d5785be4
MD5 c0e4c327df03951bb93412c20c056c4d
BLAKE2b-256 bded8807cce465a3f103253e8d4ce9bc38bbf8e2685f0841b98d89e5bb7a12ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: IronTranslator-1.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 92ae3084ce647cd60ae3f8bbb3681dae2323bf7256eb0d7e19231f946b5f8df2
MD5 d70ac025e55e23fc3810e4c4a28035be
BLAKE2b-256 0ec2d2d95ee2e6fb649d2e103641bddfff2efa912f506604e13fa6fa057fa9ab

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