Skip to main content
@ppizarror License MIT Python 3.7+ PyPi package Build status FOSSA Status Codecov Open issues PyPi downloads Total downloads Buy me a Ko-fi

PyMultiDictionary is a dictionary module for Python 3+ to get meanings, translations, synonyms and antonyms of words in 20 different languages. It uses educalingo.com, synonym.com, and Merriam-Webster for getting meanings, translations, synonyms, and antonyms.

Supported languages

  • Bengali (bn)

  • German (de)

  • English (en)

  • Spanish (es)

  • French (fr)

  • Hindi (hi)

  • Italian (it)

  • Japanese (ja)

  • Javanese (jv)

  • Korean (ko)

  • Marathi (mr)

  • Malay (ms)

  • Polish (pl)

  • Portuguese (pt)

  • Romanian (ro)

  • Russian (ru)

  • Tamil (ta)

  • Turkish (tr)

  • Ukranian (uk)

  • Chinese (zh)

Install Instructions

PyMultiDictionary can be installed via pip, for both MacOS, Windows & Linux. Simply run:

$> python3 -m pip install --upgrade PyMultiDictionary

Usage

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.

Create a dictionary object:

For example,

from PyMultiDictionary import MultiDictionary
dictionary = MultiDictionary()

This will create a local instance of the MultiDictionary class, and now it can be used to get meanings, translations, etc.

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:

(['Noun', 'Adjective', 'Exclamation'],
 '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, ‘Merriam-Webster’ can be used for English words.

from PyMultiDictionary import MultiDictionary, DICT_MW
dictionary = MultiDictionary()
print(dictionary.meaning('en', 'good', dictionary=DICT_MW))

Will return:

{
    'adjective': ['of a favorable character or tendency', ...],
    'noun': ['something that is good', ...],
    'adverb': ['well']
}

For Synonyms,

print(dictionary.synonym('es', 'Bueno'))

This will return a list containing the Synonyms of the word.

For Antonyms,

print(dictionary.antonym('en', 'Life'))

This will return a list containing the Antonyms of the word. Currently, only English is supported.

For Translations,

print(dictionary.translate('en', 'Range'))

This will return the word ‘Range’ translation in 20 different languages. You can also extend the scope of the translations by providing a target language, which will use Google Translate API, for example:

print(dictionary.translate('en', 'Range', to='ru'))

Alternatively, you can set a fixed number of words to the Dictionary Instance. This is helpful if you want to get the meanings of some words quickly without any development need.

Example:

from PyMultiDictionary import MultiDictionary, DICT_EDUCALINGO

dictionary=MultiDictionary('hotel', 'ambush', 'nonchalant', 'perceptive')
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 is available)

Supported dictionaries

  • DICT_EDUCALINGO: Meaning, synonym, translation for all languages

  • DICT_MW: Meanings (English) - Merriam-Webster

  • DICT_SYNONYMCOM: Synonyms and Antonyms (English)

  • DICT_THESAURUS: Synonyms (English)

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

Author

Pablo Pizarro R. | 2021 - 2025

Metadata

Release files for pymultidictionary 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymultidictionary 1.3.2
File Size Uploaded
pymultidictionary-1.3.2.tar.gz 24.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymultidictionary 1.3.2
File Interpreter ABI Platform
pymultidictionary-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 48.2 kB

Release files / pymultidictionary-1.3.2.tar.gz

Download URL pymultidictionary-1.3.2.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dc09b2df1cdc05e32d5c349e60621e234fefa9b37d89f43148f0d5784e924df6
BLAKE2b-256 checksum
How to use checksums
19c605cc61b7609bbcb9059883a0be9bdbfbf89f0770c7440b9db3fed7afc4dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.20

Release files / pymultidictionary-1.3.2-py3-none-any.whl

Download URL pymultidictionary-1.3.2-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a2a2d7c49000de729e1a0228ed179db4ced9a3332a3060615b6b726a63d54ab
BLAKE2b-256 checksum
How to use checksums
347d9293237643c186786945740c8bf816461e852477ce708894cac6f7664f13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.20

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files

1.3.0

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page