The Power of WordNet and How to Use It in Python

In this post, I am going to talk about the relations in WordNet ( and how you can use these in a Python project. WordNet is a database of English words with different relations between the words.

Take a look at the next four sentences.

  1.  “She went home and had pasta.”
  2. “Then she cleaned the kitchen and sat on the sofa.”
  3. “A little while later, she got up from the couch.”
  4. “She walked to her bed and in a few minutes she was snoring loudly.”

In Natural Language Processing, we try to use computer programs to find the meaning of sentences. In the above four sentences, with the help of WordNet, a computer program will be able to identify the following –

  1. “pasta” is a type of dish.
  2. “kitchen” is a part of “home”.
  3. “sofa” is the same thing as “couch”.
  4. “snoring” implies “sleeping”.

Let’s get started with using WordNet in Python. It is included as a part of the NLTK ( corpus. To use it, we need to import it first.

>>> from nltk.corpus import wordnet as wn

Continue reading

A Brief Survey on Software Recommendation Tools

Software engineering recommendation systems assist developers so that they can almost automatically find: 1) code snippets that match their programs, 2) appropriate APIs and libraries, 3) bug fixes, and 4) code changes. These systems are particularly important because they can help developers to handle large amounts of information and write stable programs. In this post, we briefly categorize existing recommendation approaches and tools.

Continue reading

What is topic modeling?

Topic modeling is an Information Retrieval (IR) technique that discovers representative topics from a collection of documents. Thus, we expect that logically related words will co-exist in the same document more frequently than words from different topics. For example, in a document about the space, it is more possibly to find words such as: planet, satellite, universe, galaxy, and asteroid. Whereas, in a document about the wildlife, it is more likely to find words such as: ecosystem, species, animal, and plant, landscape. But why text classification is so useful? In this blog post, we try to explain the importance of topic modeling and its use in software engineering.

Continue reading

How can we evaluate modern software systems?

Most people maybe think that software engineers are only coders that develop and maintain applications, systems, and infrastructures. This is not false. But, software engineers are also responsible for the assessment and improvement of the source code itself, based on specific metrics and techniques. This post briefly discusses how software engineering can evaluate modern software systems.

Continue reading

Using static analysis to evaluate Java exception handling

Static analysis is a method that one can use in order to analyze, understand, and assess the quality of a program. The main strength of static analysis is the pinpointing of coding errors without the execution of a program. In this blog post, we discuss how static analysis can contribute to the evaluation of the existing exceptions of a program and how static analysis can help in the prediction of possibly thrown exceptions by a program.

Continue reading