0% found this document useful (0 votes)
13 views4 pages

SNLP Mid term

Uploaded by

Shiv Kumar Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

SNLP Mid term

Uploaded by

Shiv Kumar Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1. What is Natural Language Processing (NLP)?

Natural Language Processing (NLP) is a subfield of artificial intelligence and linguistics focused on
enabling machines to understand, interpret, and generate human language. It combines computational
linguistics with statistical, machine learning, and deep learning techniques to process natural language in
a meaningful way. Applications of NLP include machine translation, sentiment analysis, chatbots, and
speech recognition. The goal of NLP is to bridge the gap between human communication and computer
understanding, allowing for more intuitive interactions with technology.

2. Explain Context-Free Rules and Trees in SNLP.

Context-Free Grammar (CFG):


CFG consists of a set of rules or productions used to define syntactic structures of languages. Each rule
has a single non-terminal symbol on the left-hand side and a combination of terminal and/or non-
terminal symbols on the right. For example:

 S→NP VPS \rightarrow NP \, VP (Sentence is composed of a Noun Phrase and a Verb Phrase).

 NP→Det NNP \rightarrow Det \, N (Noun Phrase is composed of a Determiner and a Noun).

Parse Trees:
A parse tree represents the syntactic structure of a sentence based on CFG. It organizes words into
hierarchical groupings corresponding to grammatical units like phrases and clauses.
For example, the sentence "The cat sleeps" would have a tree structure showing SS, NPNP, VPVP, DetDet,
NN, and VV levels. Parse trees help visualize and process sentence structures in NLP.

3. Explain Feature Structure of Unification.

Feature Structure:
A feature structure represents linguistic information in terms of attribute-value pairs. It is a formalism
used in NLP to describe properties of words, phrases, and sentences. Attributes may represent
grammatical categories (e.g., tense, number, gender), and values can be atomic (e.g., "singular") or
complex (e.g., another feature structure).

Unification:
Unification is the process of merging two compatible feature structures to create a single structure. For
example:

 Feature 1: {number: singular, tense: past}\{ \text{number: singular, tense: past} \}

 Feature 2: {tense: past, aspect: perfect}\{ \text{tense: past, aspect: perfect} \}

 Unified: {number: singular, tense: past, aspect: perfect}\{ \text{number: singular, tense: past,
aspect: perfect} \}.

Unification is used in computational grammar for agreement checking and constraint satisfaction.
4. Explain Regular Expression.

A Regular Expression (regex) is a sequence of characters defining a search pattern used for pattern
matching and text processing. It is commonly used in string searching, text replacement, and lexical
analysis. Regular expressions are built using literals, operators, and metacharacters.

Examples:

1. Matching patterns: \bcat\b matches the word "cat" as a whole.

2. Wildcard: c.t matches "cat", "cot", "cut".

3. Quantifiers: a+ matches one or more "a"s.

4. Character sets: [aeiou] matches any vowel.

Regex is essential in NLP for tokenization, text preprocessing, and information extraction.

5. Explain the Applications of NLP with an Example.

NLP has numerous real-world applications across industries.

1. Machine Translation: Translating text from one language to another using models like Google
Translate.

2. Sentiment Analysis: Identifying sentiment (positive, negative, or neutral) in text. For example,
analyzing product reviews to gauge customer satisfaction.

3. Chatbots and Virtual Assistants: NLP powers chatbots like ChatGPT or Alexa to understand user
queries and provide responses.

4. Speech Recognition: Converting spoken words into text, e.g., Siri and voice search.

5. Text Summarization: Generating concise summaries of long texts.

Example: Sentiment analysis on a review like "This product is amazing!" would classify it as positive
sentiment, helping businesses analyze customer feedback.

6. Explain FSA Morphology.

Finite State Automata (FSA) is a computational model used in NLP to process strings and analyze word
forms (morphology). Morphology studies how words are formed and structured from their roots,
prefixes, and suffixes.

FSA in Morphology:

1. Lexical Morphology: Recognizes valid word forms. For example, FSA can determine if "running"
is derived from the root "run".
2. Inflectional Morphology: Handles variations in tense, number, or gender, e.g., "walks", "walked".

3. Derivational Morphology: Recognizes new word formations, e.g., "happiness" from "happy".

FSA represents these processes as states and transitions, making it easier to validate or generate word
forms.

7. What Do You Mean by Part of Speech Tagging? Explain in Brief.

Part-of-Speech (POS) Tagging is the process of assigning grammatical categories (e.g., noun, verb,
adjective) to each word in a sentence. It helps in understanding the syntactic and semantic roles of
words in a text.

Example: In the sentence "The quick brown fox jumps," the tags might be:

 The (Determiner)

 Quick (Adjective)

 Brown (Adjective)

 Fox (Noun)

 Jumps (Verb)

POS tagging uses rules or machine learning models like HMM or CRF to analyze the context of words and
assign appropriate tags.

8. Explain Ambiguity in SNLP.

Ambiguity occurs when a word, phrase, or sentence has multiple interpretations. In Speech and Natural
Language Processing (SNLP), ambiguity is a major challenge.

Types of Ambiguity:

1. Lexical Ambiguity: A single word has multiple meanings. For example, "bank" can mean a
financial institution or the side of a river.

2. Syntactic Ambiguity: A sentence has multiple parse structures. For example, "I saw the man with
the telescope" can mean either the man had a telescope or I used one to see him.

3. Semantic Ambiguity: A sentence has multiple interpretations based on its meaning. For
example, "The chicken is ready to eat" can refer to either the chicken being food or the chicken
being hungry.

4. Pragmatic Ambiguity: Ambiguity arises from context. For example, "Can you pass the salt?" is a
request, not a question.

Resolving ambiguity requires contextual and grammatical analysis.


9. Explain Probabilistic Context-Free Grammar (PCFG).

A Probabilistic Context-Free Grammar (PCFG) extends Context-Free Grammar by associating


probabilities with each production rule. This allows ranking of parse trees and selection of the most likely
one for a given sentence.

Structure:
Each production rule in CFG is assigned a probability P(R)P(R), such that ∑P(R)=1\sum P(R) = 1 for rules
with the same non-terminal on the left-hand side.

Example:
For NP→Det NNP \rightarrow Det \, N:

 P(Det → the)=0.6P(\text{Det → the}) = 0.6

 P(Det → a)=0.4P(\text{Det → a}) = 0.4

Applications:
PCFG is used in syntactic parsing, speech recognition, and machine translation, where it helps resolve
ambiguities by selecting the most probable interpretation of a sentence.

You might also like