NLP Final
NLP Final
NLP Final
Part-of-speech tagging is the process of assigning grammatical categories (such as noun, verb, adjective) to
words in a text.
1) Syntactic Analysis: Helps identify the role of words in a sentence for parsing and grammar
analysis.
2) Semantic Analysis: Aids in understanding the meaning of words and their relationships in a
sentence.
3) Machine Translation: Facilitates accurate translation by preserving grammatical structure.
4) Information Retrieval: Enhances search accuracy by considering word usage and context.
5) Named Entity Recognition (NER): Identifies and categorizes named entities like people,
organizations, and locations.
6) Text-to-Speech Systems: Assists in generating natural-sounding speech by providing proper
pronunciation cues.
7) Grammar Checking: Enables automated proofreading and correction by identifying word
usage errors.
8) Information Extraction: Supports extracting relevant information from text by understanding
word roles.
9) Improving NLP Models: Contributes to training better NLP models by providing labeled data
for supervised learning.
Types of Tokenization:
3) Whitespace Tokenization: using spaces as separators to break the text into tokens.
Ex. "The sun is shining" is tokenized into ["The", "sun", "is", "shining"].
4) Punctuation Tokenization: using punctuation marks as separators to split the text into
tokens.
Ex. "He said, 'Hello! How are you?'" is tokenized into ["He", "said", ",", "'Hello", "!", "How", "are", "you",
"?", "'"].
Q2) a) What is Natural Language Processing (NLP)? Discuss various stages involved in NLP process with suitable
example.
- (NLP) is a subfield of AI
- It focuses on the interaction between computers and human language.
- It enable machines to understand, interpret, and generate human language.
Stages:
1) Text Acquisition: Gathering relevant textual data.
Ex. Extracting text from news articles for sentiment analysis or information retrieval.
6) Data Privacy and Security: Data privacy and security require careful management in
language processing tasks.
Ex. Disambiguating between the different senses of "bat" (e.g., a flying mammal or a sports
equipment) in a given context
Q3) a) Derive a top-down, depth-first, left-to-right parse tree for the given sentence: “The angry bear chased
the frightened little squirrel” Use the following grammar rules to create the parse tree:
Q4) a) What is Probabilistic context-free grammars? State the benefits of probabilistic parsing
Extends context-free grammars with probabilities for production rules, commonly used in syntactic
parsing.
b) Explain with suitable examples following relationship between word meanings, 1. Homonymy 2. Polysemy 3.
Synonymy 4. Hyponymy