NLP Previous Sem-4-5
NLP Previous Sem-4-5
b) NLP Models like ChatGPT3 are very good at Natural language understanding that is why 10
they are so good at responding to different types of prompts in various languages.
Explain different technologies involved in automatic natural language understanding
c) Compare and contrast Stemming and Lemmatization operations in NLP 5
UNIT – II
3. a) Regular expressions are a powerful tool for pattern matching in NLP. Explain the basic 10
meta-characters used in regular expressions, including wildcards, ranges, and closures
with examples of each meta-character and describe how they can be used in pattern
matching tasks.
b) Build the regular expression to check 10
i. whether the string starts with the given pattern or not str = "Data Science"
ii. if whitespace is removed from the string having whitespace at the beginning
and end of a string.
c) Differentiate between list, strings and tuples. 5
OR
4. a) You are developing a text editor that includes a feature to detect and highlight specific 10
Page 1 of 2
grammatical constructs in text. Build the regular expressions to match the following
classes of strings:
i. Strings containing any one of the determiners - a, an, and the.
ii. An arithmetic expression using integers, addition, and multiplication,
such as 2*3+8.
b) Explain segmentation with derivative and evaluate function. 10
c) Our programs often need to deal with different languages, and different character sets. 5
Explain what you understand by the Unicode.
UNIT – III
5. a) The POS is identified using the word, its meaning and the context in which the word is 10
used. Explain POS tagging and illustrate reading and POS tagging of a tagged corpora
with python code using NLTK library.(Use Brown Corpus)
b) Python dictionary is the efficient way of storing the data as a key value pair. Explain 10
how the mapping of word to tag is done using dictionary. Explain and develop the
default dictionary of value list with example program.
c) Develop a python program to find the POS of given sentences. 5
Sent= "The quick brown fox jumps over the lazy dog"
OR
6. a) With the neat diagram explain how process of general N-gram tagging using NLTK 10
library’s built-in taggers. Why should data be split into training and test portions?
b) With suitable python code explain the automatic tagging with the evaluate function. 10
c) Explain the universal part of speech tag set. 5
UNIT – IV
7. a) The supervised classification classifies the based on the labeled data. With a neat 10
diagram explain working principle of supervised classification of text.
b) Develop a python NLP program for Movie review using NLTK library’s Naïve Bayes 10
classifier and ‘names’ corpus.
c) Explain the confusion matrix for the bigram tagger. 5
OR
8. a) Develop a python program for POS tagging using Decision Tree Classifier in NLTK. Use 10
tagged Brown corpus for training.
b) In general, one text depicts the same meaning of text2. Briefly describe recognizing the 10
textual entailment with an example.
c) Decision tree is supervised classification to classify the input. With a suitable diagram 5
explain the decision tree for classification.
***
Page 2 of 2