It's been a long time since I wrote a post. So here comes anjusthoughts with a Bang... This post is inspired by one of my colleagues
As we all know, Language is a means of communication. Languages can be broadly classified into two namely:
- Natural languages are the languages that people speak, such as English, Spanish, and French. These languages are not designed and are evolved naturally.
- Formal languages are languages that are designed by people for specific applications.
Natural Language Processing
Natural
Language Processing or NLP consist of a set of tasks computers
perform to understand natural language and generate natural language.
The computer is used for the interpretation and analysis of Natural
Language.
Natural
Language Generation (NLG)
NLG
is when a computer writes text of the same quality as that of a human
being. It can also be termed as Text Generation.
Natural
Language Understanding (NLU)
NLU
attempts to understand the meaning behind a written text. NLU faces
the challenge of understanding a text without ambiguity, while
understanding the rules of the language used. So tow issues must be
addressed:
- What to say- What we are going to talk about
- How to say- It deals with formulating grammatically correct sentences.
Stages of Natural Language Processing
Natural Language
Processing can be divided into three stages namely:
- Syntactic Analysis
- Semantic Analysis
- Contextual Representation
Now let’s look
into each of these stages in detail:
- Syntactic Analysis
In this phase the
input is being checked to ensure that its syntax is correct. This is
done based on a grammar. The following are the two simple methods
used:
- Context Free Grammars(CFG)
Consider the following
sentence:
“The cat eats
rice.”
The parse tree for the
above sentence is as follows:
The list of rules for
the construction of the tree are:
S -> NP VP
NP -> DET N | DET ADJ N
VP -> V NP
NP -> DET N | DET ADJ N
VP -> V NP
The above sentence consists of:
DET -> the
ADJ-> big|fat
Top- Down Parser
The parser starts with
the symbol S and attempts to rewrite the sentence into a sequence of
Terminals. The structure of CFG consists of:
- LHS- It consist of Non terminals or symbols. They cannot be expanded further.
- RHS- These include terminals or non terminals.
- Semantic Analysis
It involves the
formulation of a logical representation of the sentence. The meaning
of the sentence must be extracted for such a representation.
- Contextual Representation
As its name implies
the sentence is analysed based on the context. The logical
representation is converted into a Knowledge representation.
More updates about Natural Language Processing in the Next Post....
I am Thankful to all those who said NO. Because of them I did it myself.
No comments:
Post a Comment