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

Uploaded Python 3

File details

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

File metadata

  • Download URL: IronTranslator-1.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 7dc018fff05565ea0469f4794890397cb028012d9f46ff819c570851d8bfd6d0
MD5 33eca2f3eb42b7dbdfe45742ddf452d3
BLAKE2b-256 250020ae50a408bee62077470fe8d88f0afffde1bcdfa7e217a1ee7ab9c8d62d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: IronTranslator-1.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4846bc6f932f8bdced5cb1c2b8bfb51ac7461c6077ec6d1d4b98bedd3342abbe
MD5 8778c0d06d8ec515745d92fcf23c8a9e
BLAKE2b-256 d3449d62b8e685df68e1b6c7991dee046c820d7e1bdb5cd408c8dd3b0a30ee58

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