NLP Self
NLP Self
• Syntactic analysis:
• Syntactic analysis, also known as syntax analysis or parsing, is the process of
examining natural language using formal grammar rules. It assigns a structure
to the text. For instance, in a sentence, the subject is a noun phrase, and the
predicate is a verb phrase.
• Example: In the sentence "The dog went away," "The dog" is the noun phrase
(subject) and "went away" is the verb phrase (predicate).
• SEMANTIC ANALYSIS
• We understand what people say without thinking much about it, using our
knowledge of language. To really understand language, we need to know the
meaning of words and the context they are used in. Semantic analysis is about
figuring out the meaning of words and sentences. This is very difficult and still
not fully solved in natural language processing.
• Natural Language Processing Techniques for Understanding Text:
• Parsing
• Definition: Parsing means breaking down a sentence to see what each part does.
• Explanation: It's like taking a sentence apart to understand how it's built.
Computers do this to figure out the grammar and meaning of the sentence.
• Example: In the sentence "The dog chased the cat," parsing shows that "The dog" is
the one doing something, "chased" is what it's doing, and "the cat" is the one being
chased.
• Stemming
• Definition: Stemming is about finding the main part of a word.
• Explanation: It's like looking at a word and figuring out its basic form, ignoring any
extra bits added to the beginning or end.
• Example: For words like "touching," "touched," and "touches," stemming tells us
they're all about the action of "touch."
• Text Segmentation
• Definition: Text segmentation is breaking up text into smaller parts that make
sense. Explanation: It's like chopping up a long piece of text into smaller,
understandable pieces so a computer can work with it better. Example: Most of
the time, words are separated by spaces, but sometimes words like "icebox"
need special treatment because they're stuck together.
• Sentiment Analysis
• Definition: Sentiment analysis is about understanding if the writer or speaker
feels positive, negative, or neutral about something. Explanation: It's like
reading a text and figuring out if the person is happy, sad, or just giving
information. Example: If a review says "I love this phone," sentiment analysis
knows it's positive, but if it says "I hate this phone," it's negative. This helps
businesses know what customers think about their products.
• Applications Of NLP:
• NP N
• Parsers and Its Types in NLP:
• Recursive Descent Parser: This parser starts from the top of a grammar rule
and works its way down by breaking it into smaller parts. It's like taking apart
a big rule into smaller rules until it's easy to understand. People often use this
method to write parsers for simple programming languages or specific areas.
• Shift-Reduce Parser: This parser starts from the input and builds a tree by
moving data around and applying grammar rules. It's like solving a puzzle by
shifting pieces around and fitting them together. This method is commonly
used for programming languages and uses techniques like LR or LALR.
• Chart Parser: This parser efficiently processes words using a dynamic
programming approach. It's like solving a complex problem by storing and
reusing solutions to smaller parts. An example is the "Early parser" which is
good for context-free grammars.
• Regexp Parser: This parser matches patterns and extracts text from larger
documents using regular expressions. It's like finding specific words or
phrases in a book by looking for patterns. This method is useful for tasks like
text processing and information retrieval.