You are on page 1of 5

3.

1 Natural Language Processing


Introduction

• Natural language processing (NLP) is a branch of artificial intelligence within computer science
that focuses on helping computers to understand the way that humans write and speak.

• NLP is a sub-field of AI that is focused on enabling machines to understand and process human
conversations.

• How human can communicate each other?

---We might use different languages(reading,writing,speaking and listening)

• When we communicate, our brain will listens->Interpret->React

• Computer should replicate the same thing(Machine – Human beings communicate each other)

• The field of NLP involves making computers to perform useful tasks with the natural languages
humans use. The input and output of an NLP system can be −

- Speech

- Written Text

• How computers communicate?

Computers work on binary and everything which is coded into computing language (HLL) gets
translated into Machine language.

• Now NLP deals with the idea of having computers understand our language without need for
programming language.

Applications of NLP

• Speech Processing (Google Assistant)-Enable computer to understand what people are saying.

• Automatic text summarization

It is used to summarize the news, articles or content.

• Sentimental Analysis (Comments or rating)


• Machine Translations

• Chatbots

Components of NLP

• Basically, there are two components

• Natural Language Understanding(NLU)

• Basically,the mapping to given input in NL into useful representation

• Analyzing different aspects of the language.

• Natutal Language Generation(NLG)

• It is the process of producing meaningful phrases and sentences in the form of natural language
from some internal representation.

It involves −

• Text planning − It includes retrieving the relevant content from knowledge base.

• Sentence planning − It includes choosing required words, forming meaningful phrases, setting
tone of the sentence.

• Text Realization − It is mapping sentence plan into sentence structure.


Steps in NLP

1. Lexical Analysis

We have to arrange the structure of words. The collection of words and phrases in language is lexicon
of a language.

2.Syntactic Analysis(Parsing)

Need to parsing for the analysis of the word. Although, have to arrange the words in a particular
manner that shows the relationship between words.

3.Semantic Analysis

It describes a dictionary meaning which is meaningful. In the task domain, mapping syntactic structure
and objects.

4.Discourse integration

In this step, the meaning of any sentence depends upon the meaning of the previous sentence. In
addition also brings the meaning to immediately succeeding sentence.

5.Progmatic Analysis

In this step, data is interpreted on what is actually meant. Although we have to derive aspects of
language which requires real world knowledge.

Difficulties in NLU

1.Lexical Ambiguity

Its predefined at a very primitive level such as word-level.

2.Syntax level ambiguity

In this, we can define in a parsed way or different way.

3.Referential Ambiguity

We have to reference something to pronounce. One input can mean different meanings.

Syntactic Analysis

• Syntax analysis or parsing is the important phase in NLP.


• The purpose of this phase is to draw exact meaning or dictionary meaning from the text.

• Syntax refers to arrangements of words in a sentence such that they make grammatical sense.

• It is used to assess how NL aligns with grammatical rules.

• It help us to understand the role played by different words in the body of text.

• Example: He ate banana -> is correct

ate he banana -> is not in proper order.

Semantic Analysis

• NLP is a field which aims to give machine the ability to understand natural language.

• It is a sub-topic of Natural language processing.

• It is giving exact meaning of text.

• Role of semantic analysis is to check text for meaningfulness.

• Semantic Analysis is meaning of individual word and combination of words.

• Relationship exist between words

• Word order

Composition semantics

• It involves how word combines to form larger meaning ->Meaning of each matters.

• Lexical semantics + Composition semantics=Semantic analysis

• Building Blocks of Semantic system:

• Entities-Represents the individual such as person, vehicle ,location etc..

• Concept- Category of individuals(Talk about person or location)

• Relations- Relation b/w entities and Concepts

• Different syntax and same semantics:

These statements are written is different but their meaning are the same.

Example: 3+5= 5+3

• Different Semantics and same syntax

printf(“hello”) and cout<<“hello”;

• Perfect syntax but No meaning

Syntactically its correct. But no proper expected output from the system.

You might also like