Complete Guide On PyDictionary: A “Real” Dictionary Module in Python

PyDictionary is an open-source python library that is used to find the meaning of the words, translation of words and sentences to different languages.
PyDictionary Python

Dictionary is a list of all the words of a particular language generally in alphabetical order with their meanings and other properties like synonyms, antonyms, etc. It helps us learn about different words that are there in a language. Python also allows us to use the dictionary by a module named PyDictionary.

A Dictionary is the most important tool to understand the vocabulary of any language because it has all the words that are there in the vocabulary of a language listed in it.

PyDictionary is an open-source python library that is used to find the meaning of the words, translation of words and sentences to different languages, and other linguistic properties of different words. PyDictionary uses wordnet for the meanings of the words and search engines for translating the words to different languages.


Sign up for your weekly dose of what's up in emerging technology.

Pydictionary uses beautifulsoup4, requests, etc. in order to fetch the meanings and the linguistic properties of the words and sentences. In this article, we will explore how we can use PyDictionary and what are the different functionalities it provides.


Like any other python library, we will install PyDictionary using pip install PyDictionary

  1. Importing Required Libraries

We will be using PyDictionary for performing different linguistics operations so we will import pydictionary.

from PyDictionary import PyDictionary

  1. Creating Instance of Dictionary

For using PyDictionary we can either create an instance and use it for different words or we can create an instance with passing some words we will use as the argument. We will explore both options.

dictionary1 = PyDictionary()

dictionary2 = PyDictionary("exclusive","precipitation")

  1. Performing Operations on different words

Now we will use different functions and extract some of the linguistics properties of different words.

  1. Meaning of word

#Meaning of Word using dictionary1


Meaning of Word

#Meaning of Words in Dictionary2


Meaning of words in dictionary
  1. Finding Synonym

#Finding Synonym using Dictionary1



#Finding Synonyms of word in Dictionary2

print (dictionary2.getSynonyms())

Synonyms Of words in dictionary
  1. Finding Antonyms

#Finding antonyms using dictionary1



#Finding antonyms using dictionary2

print (dictionary2.getAntonyms())

Antonyms of words in dictionary
  1. Translating Words

#Translating using Dictionary1

dictionary1.translate("Archive", "hi") #Translating to hindi


#Translating words in dictionary2

print (dictionary2.translateTo("hi"))

Translating words in dictionary

Similarly, we can translate words into different languages by giving the desired language in the parameter section.

These are some of the functionalities that are provided by PyDictionary and we can use it according to our requirements for different projects.


In this article, we explored what are the different functionalities that are provided by PyDictionary, how we can start by creating instances by two different methods. How we can use these instances for extracting different linguistics properties. Further, we saw how we can easily translate different words in different languages without any hassle. PyDictionary is easy to use and a very helpful library for linguistic properties.

More Great AIM Stories

Himanshu Sharma
An aspiring Data Scientist currently Pursuing MBA in Applied Data Science, with an Interest in the financial markets. I have experience in Data Analytics, Data Visualization, Machine Learning, Creating Dashboards and Writing articles related to Data Science.

Our Upcoming Events

Conference, in-person (Bangalore)
Machine Learning Developers Summit (MLDS) 2023
19-20th Jan, 2023

Conference, in-person (Bangalore)
Rising 2023 | Women in Tech Conference
16-17th Mar, 2023

Conference, in-person (Bangalore)
Data Engineering Summit (DES) 2023
27-28th Apr, 2023

Conference, in-person (Bangalore)
MachineCon 2023
23rd Jun, 2023

Conference, in-person (Bangalore)
Cypher 2023
20-22nd Sep, 2023

3 Ways to Join our Community

Whatsapp group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our newsletter

Get the latest updates from AIM