João Vitor
commited on
Commit
·
16bac78
1
Parent(s):
137c4b5
docs: fix typo
Browse files- docs/README.rst +13 -13
- docs/contributing.rst +1 -1
- docs/usage.rst +5 -5
docs/README.rst
CHANGED
|
@@ -64,7 +64,7 @@ I needed to translate a text using python. It was hard to find a simple way to d
|
|
| 64 |
There are other libraries that can be used for this task, but most of them
|
| 65 |
are **buggy, not free, limited, not supported anymore or complex to use.**
|
| 66 |
|
| 67 |
-
Therefore, I decided to build this simple tool. It is 100% free, unlimited, easy to use and
|
| 68 |
support for all languages.
|
| 69 |
|
| 70 |
Basically, my goal was to integrate support for multiple famous translators
|
|
@@ -86,8 +86,8 @@ Why you should use it
|
|
| 86 |
======================
|
| 87 |
|
| 88 |
- It's the only python tool that integrates many translators
|
| 89 |
-
-
|
| 90 |
-
-
|
| 91 |
- High level of abstraction
|
| 92 |
- Automatic language detection
|
| 93 |
- Easy to use and extend
|
|
@@ -258,7 +258,7 @@ Google Translate
|
|
| 258 |
|
| 259 |
- You can also reuse the Translator class and change/update its properties.
|
| 260 |
|
| 261 |
-
(Notice that this is important for performance too since instantiating new objects is expensive)
|
| 262 |
|
| 263 |
|
| 264 |
.. code-block:: python
|
|
@@ -410,7 +410,7 @@ Linguee Translator
|
|
| 410 |
# pass language by their abbreviation
|
| 411 |
translated_word = LingueeTranslator(source='en', target='fr').translate(word)
|
| 412 |
|
| 413 |
-
- Return all synonyms or words that
|
| 414 |
|
| 415 |
.. code-block:: python
|
| 416 |
|
|
@@ -444,7 +444,7 @@ PONS Translator
|
|
| 444 |
# pass language by their abbreviation
|
| 445 |
translated_word = PonsTranslator(source='en', target='fr').translate(word)
|
| 446 |
|
| 447 |
-
- Return all synonyms or words that
|
| 448 |
|
| 449 |
.. code-block:: python
|
| 450 |
|
|
@@ -462,8 +462,8 @@ Yandex Translator
|
|
| 462 |
|
| 463 |
.. note::
|
| 464 |
|
| 465 |
-
You need to require
|
| 466 |
-
|
| 467 |
|
| 468 |
- Language detection
|
| 469 |
|
|
@@ -503,7 +503,7 @@ Microsoft Translator
|
|
| 503 |
.. note::
|
| 504 |
|
| 505 |
You need to require an **api key** if you want to use the microsoft translator.
|
| 506 |
-
|
| 507 |
Microsoft offers a free tier 0 subscription (2 million characters per month).
|
| 508 |
|
| 509 |
- Required and optional attributes
|
|
@@ -549,7 +549,7 @@ Papago Translator
|
|
| 549 |
.. note::
|
| 550 |
|
| 551 |
You need to require a **client id** and **client secret key** if you want to use the papago translator.
|
| 552 |
-
|
| 553 |
|
| 554 |
.. code-block:: python
|
| 555 |
|
|
@@ -600,8 +600,8 @@ Libre Translator
|
|
| 600 |
Proxy usage
|
| 601 |
-------------
|
| 602 |
|
| 603 |
-
deep-translator
|
| 604 |
-
and pass it to the corresponding translator. Below is an example using the GoogleTranslator but this feature
|
| 605 |
can be used with all supported translators.
|
| 606 |
|
| 607 |
.. code-block:: python
|
|
@@ -768,5 +768,5 @@ Here are some screenshots:
|
|
| 768 |
Website & Desktop app
|
| 769 |
===========================
|
| 770 |
|
| 771 |
-
Currently, there are propositions for a website and/or
|
| 772 |
You can follow the issue here: https://github.com/nidhaloff/deep-translator/issues/144
|
|
|
|
| 64 |
There are other libraries that can be used for this task, but most of them
|
| 65 |
are **buggy, not free, limited, not supported anymore or complex to use.**
|
| 66 |
|
| 67 |
+
Therefore, I decided to build this simple tool. It is 100% free, unlimited, easy to use and provides
|
| 68 |
support for all languages.
|
| 69 |
|
| 70 |
Basically, my goal was to integrate support for multiple famous translators
|
|
|
|
| 86 |
======================
|
| 87 |
|
| 88 |
- It's the only python tool that integrates many translators
|
| 89 |
+
- Multi language support
|
| 90 |
+
- Supports batch translation
|
| 91 |
- High level of abstraction
|
| 92 |
- Automatic language detection
|
| 93 |
- Easy to use and extend
|
|
|
|
| 258 |
|
| 259 |
- You can also reuse the Translator class and change/update its properties.
|
| 260 |
|
| 261 |
+
(Notice that this is important for performance too, since instantiating new objects is expensive)
|
| 262 |
|
| 263 |
|
| 264 |
.. code-block:: python
|
|
|
|
| 410 |
# pass language by their abbreviation
|
| 411 |
translated_word = LingueeTranslator(source='en', target='fr').translate(word)
|
| 412 |
|
| 413 |
+
- Return all synonyms or words that match
|
| 414 |
|
| 415 |
.. code-block:: python
|
| 416 |
|
|
|
|
| 444 |
# pass language by their abbreviation
|
| 445 |
translated_word = PonsTranslator(source='en', target='fr').translate(word)
|
| 446 |
|
| 447 |
+
- Return all synonyms or words that match
|
| 448 |
|
| 449 |
.. code-block:: python
|
| 450 |
|
|
|
|
| 462 |
|
| 463 |
.. note::
|
| 464 |
|
| 465 |
+
You need to require a **private api key** if you want to use the yandex translator.
|
| 466 |
+
Visit the official website for more information about how to get one
|
| 467 |
|
| 468 |
- Language detection
|
| 469 |
|
|
|
|
| 503 |
.. note::
|
| 504 |
|
| 505 |
You need to require an **api key** if you want to use the microsoft translator.
|
| 506 |
+
Visit the official website for more information about how to get one.
|
| 507 |
Microsoft offers a free tier 0 subscription (2 million characters per month).
|
| 508 |
|
| 509 |
- Required and optional attributes
|
|
|
|
| 549 |
.. note::
|
| 550 |
|
| 551 |
You need to require a **client id** and **client secret key** if you want to use the papago translator.
|
| 552 |
+
Visit the official website for more information about how to get one.
|
| 553 |
|
| 554 |
.. code-block:: python
|
| 555 |
|
|
|
|
| 600 |
Proxy usage
|
| 601 |
-------------
|
| 602 |
|
| 603 |
+
deep-translator provides out of the box usage of proxies. Just define your proxies config as a dictionary
|
| 604 |
+
and pass it to the corresponding translator. Below is an example using the GoogleTranslator, but this feature
|
| 605 |
can be used with all supported translators.
|
| 606 |
|
| 607 |
.. code-block:: python
|
|
|
|
| 768 |
Website & Desktop app
|
| 769 |
===========================
|
| 770 |
|
| 771 |
+
Currently, there are propositions for a website and/or desktop app based on deep-translator.
|
| 772 |
You can follow the issue here: https://github.com/nidhaloff/deep-translator/issues/144
|
docs/contributing.rst
CHANGED
|
@@ -98,7 +98,7 @@ Before you submit a pull request, check that it meets these guidelines:
|
|
| 98 |
|
| 99 |
1. The pull request should include any relevant tests (located under :file:`.deep_translator/tests`)
|
| 100 |
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
|
| 101 |
-
3. Pull requests are automatically tested on GitHub for
|
| 102 |
|
| 103 |
Tips
|
| 104 |
----
|
|
|
|
| 98 |
|
| 99 |
1. The pull request should include any relevant tests (located under :file:`.deep_translator/tests`)
|
| 100 |
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
|
| 101 |
+
3. Pull requests are automatically tested on GitHub for compatibility with Python version 3.7, 3.8, and 3.9. Please review your test results and ensure your request passes all tests.
|
| 102 |
|
| 103 |
Tips
|
| 104 |
----
|
docs/usage.rst
CHANGED
|
@@ -214,7 +214,7 @@ Linguee Translator
|
|
| 214 |
# pass language by their abbreviation
|
| 215 |
translated_word = LingueeTranslator(source='en', target='fr').translate(word)
|
| 216 |
|
| 217 |
-
- Return all synonyms or words that
|
| 218 |
|
| 219 |
.. code-block:: python
|
| 220 |
|
|
@@ -248,7 +248,7 @@ PONS Translator
|
|
| 248 |
# pass language by their abbreviation
|
| 249 |
translated_word = PonsTranslator(source='en', target='fr').translate(word)
|
| 250 |
|
| 251 |
-
- Return all synonyms or words that
|
| 252 |
|
| 253 |
.. code-block:: python
|
| 254 |
|
|
@@ -266,8 +266,8 @@ Yandex Translator
|
|
| 266 |
|
| 267 |
.. note::
|
| 268 |
|
| 269 |
-
You need to require
|
| 270 |
-
|
| 271 |
|
| 272 |
- Language detection
|
| 273 |
|
|
@@ -345,7 +345,7 @@ For a quick access, you can use the deep_translator from terminal. For this to w
|
|
| 345 |
the right arguments, which are the translator you want to use, source language, target language and the text
|
| 346 |
you want to translate.
|
| 347 |
|
| 348 |
-
For example, provide "google" as an argument to use the google translator. Alternatively you can use
|
| 349 |
the other supported translators. Just read the documentation to have an overview about the supported
|
| 350 |
translators in this library.
|
| 351 |
|
|
|
|
| 214 |
# pass language by their abbreviation
|
| 215 |
translated_word = LingueeTranslator(source='en', target='fr').translate(word)
|
| 216 |
|
| 217 |
+
- Return all synonyms or words that match
|
| 218 |
|
| 219 |
.. code-block:: python
|
| 220 |
|
|
|
|
| 248 |
# pass language by their abbreviation
|
| 249 |
translated_word = PonsTranslator(source='en', target='fr').translate(word)
|
| 250 |
|
| 251 |
+
- Return all synonyms or words that match
|
| 252 |
|
| 253 |
.. code-block:: python
|
| 254 |
|
|
|
|
| 266 |
|
| 267 |
.. note::
|
| 268 |
|
| 269 |
+
You need to require n **private api key** if you want to use the yandex translator.
|
| 270 |
+
Visit the official website for more information about how to get one
|
| 271 |
|
| 272 |
- Language detection
|
| 273 |
|
|
|
|
| 345 |
the right arguments, which are the translator you want to use, source language, target language and the text
|
| 346 |
you want to translate.
|
| 347 |
|
| 348 |
+
For example, provide "google" as an argument to use the google translator. Alternatively, you can use
|
| 349 |
the other supported translators. Just read the documentation to have an overview about the supported
|
| 350 |
translators in this library.
|
| 351 |
|