Natural Language Processing

NLP
Extension Description
Create and train your own text classifiers with Natural Language Processing.

Introduction

Natural Language Processing, abbreviated as NLP, is a branch of artificial intelligence that deals with the interaction between computers and humans using natural language. Natural language refers to language that is spoken and written by people, and natural language processing (NLP) attempts to extract information from the spoken and written word using algorithms.

The ultimate objective of NLP is to read, decipher, understand, and make sense of human languages in a manner that is valuable.

NLP in PictoBlox

To make the text classifier, we have the Natural Language Processing extension.NLP

Application

  1. Email Filters: Email filters are one of the most basic and initial applications of NLP online. It started out with spam filters, uncovering certain words or phrases that signal a spam message.
  2. Smart Assistants: Smart assistants like Apple’s Siri and Amazon’s Alexa recognize patterns in speech, then infer meaning and provide a useful response.

Accessing NLP in Block Coding

Following is the process to add Natural Language Processing capability to the PictoBlox Project.

  1. Open PictoBlox and create a new file.
  2. Select the coding environment as Block Coding.
  3. Next, click on the Add Extension button and add the Natural Language Processing extension.
  4. You can find the Natural Language Processing blocks available in the project.

 

Accessing NLP in Python Coding

Following is the process to add Natural Language Processing capability to the PictoBlox Project.

  1. Open PictoBlox and create a new file.
  2. Select the coding environment as Python Coding.
  3. Next, click on the Add Modules/Libraries button and add the Natural Language Processing extension.
  4. To access the library functions, you have to add the object declaration.
    nlp = NaturalLanguageProcessing()
Read More

PictoBlox Blocks

The block adds the specified text data to the specified class for the training.
The block trains the NLP model with the data added with add () as () block.
The block resets and clears the NLP model.
The function analyses the specified test and provides the class name under which it has been classified by the NLP model.
The block analyses the specified text and provides the sentiment associated with the text – Positive, Negative or Neutral.
All articles loaded
No more articles to load

Block Coding Examples

All articles loaded
No more articles to load

Python Functions

The function adds the specified text data to the specified class.
Syntax: pushdata(text_data = “your text”, class_label = “class”)
The function trains the NLP model with the data added with pushdata() function.
Syntax: train()
The function resets and clears the NLP model.
Syntax: reset()
The function analyses the specified test and provides the class name under which it has been classified by the NLP model.
Syntax: analyse(text = “your text”)
All articles loaded
No more articles to load
Table of Contents