Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
ppizarror authored Feb 20, 2024
1 parent 5c073f9 commit 539f2fc
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ PyMultiDictionary can be installed via pip, for both MacOS, Windows & Linux. Sim
Usage
-----

PyMultiDictionary can be utilised in 2 ways, either by creating a dictionary instance
PyMultiDictionary can be utilized in 2 ways, either by creating a dictionary instance
which can take words as arguments or by creating a dictionary instance with a fixed
amount of words.

Expand All @@ -99,8 +99,8 @@ For example,
from PyMultiDictionary import MultiDictionary
dictionary = MultiDictionary()
This is will create a local instance of the MultiDictionary class and now it can
be used to get meanings, translations etc.
This will create a local instance of the MultiDictionary class and now it can
be used to get meanings, translations, etc.

For **Meanings**,

Expand All @@ -109,16 +109,16 @@ For **Meanings**,
print(dictionary.meaning('en', 'good'))
This will return a tuple containing the meanings of the word, in the format
*(word_type, word_meaning, word_wikipedia)*. For example the above code will return:
*(word_type, word_meaning, word_wikipedia)*. For example, the above code will return:

.. code-block:: python
(['Noun', 'Adjective', 'Exclamation'],
'The first definition of good in the dictionary is having admirable ...',
'Good may refer to: ▪ Good and evil, the distinction between positiv...')
'The first definition of good in the dictionary is having admirable ...',
'Good may refer to: ▪ Good and evil, the distinction between positive...')
All methods support other dictionaries, for example, 'wordnet' can be used
for english words.
for English words.

.. code-block:: python
Expand Down Expand Up @@ -150,7 +150,7 @@ For **Antonyms**,
print(dictionary.antonym('en', 'Life'))
This will return a list containing the Antonyms of the word. Currently only English is supported.
This will return a list containing the Antonyms of the word. Currently, only English is supported.

For **Translations**,

Expand All @@ -159,8 +159,8 @@ For **Translations**,
print(dictionary.translate('en', 'Range'))
This will return the Translation of the word 'Range' in 20 different languages.
You can also extendthe scope of the translations by providing a target language,
which will use google translate API, for example:
You can also extend the scope of the translations by providing a target language,
which will use Google Translate API, for example:

.. code-block:: python
Expand All @@ -176,13 +176,13 @@ Example:
from PyMultiDictionary import MultiDictionary, DICT_EDUCALINGO
dictionary=MultiDictionary('hotel', 'ambush', 'nonchalant', 'perceptive')
dictionary.set_words_lang('en') # All words are english
dictionary.set_words_lang('en') # All words are English
print(dictionary.get_meanings(dictionary=DICT_EDUCALINGO)) # This print the meanings of all the words
print(dictionary.get_synonyms()) # Get synonyms list
print(dictionary.get_antonyms()) # Get antonyms
print(dictionary.get_translations()) # This will translate all words to over 20 languages
print(dictionary.get_translations(to='ru')) # This will translate all words to Russian (if Google API available)
print(dictionary.get_translations(to='ru')) # This will translate all words to Russian (if Google API is available)
Supported dictionaries
----------------------
Expand All @@ -192,7 +192,7 @@ Supported dictionaries
- **DICT_THESAURUS**: Synonyms (English)
- **DICT_WORDNET**: Meanings (English)

There are much more dictionaries to come. Just contribute to this repo!
There are many more dictionaries to come. Just contribute to this repo!

Author
------
Expand Down

0 comments on commit 539f2fc

Please sign in to comment.