Professional Documents
Culture Documents
Part A
(Compulsory)
1. Answer the following questions.
a. Define Grammar & Parsing.
A system for describing a language, the rules of a language. A formal system for describing the syntax of a language.
Parsing or syntactic analysis is the process of analysing a string of symbols, either in natural language or in computer
languages, conforming to the rules of a formal grammar.
b. List various forms of verbs.
Main verbs have three basic forms: the base form, the past form and the -ed form (sometimes called the -ed
participle):
base form: used as the infinitive form, with to or without to (Do you want to come with us? I cant leave now.) and for
the present simple (I always read before I go to sleep every night.) except third person singular, which uses the -s form
(She works at the university.)
past form: used for the past simple (He opened the door and went out.)
-ed form: used after auxiliary have and be (Ive always wanted a piano and I was given one last week.).
c. Explain Particles.
Particles are the words that help to construct some verb forms Particles generally overlap with the class of
prepositions
d. Define Clausal complements.
Many verbs allow clauses as complements. Clauses share most of the same properties of sentences and may have a
subject, indicate tense, and occur in passivized forms. One common clause form consists of a sentence form preceded
by the complementizer that, as in that Jack ate the pizza. This clause will be identified by the expression S[that],
indicating a special subclass of S structures. This clause may appear as the complement of the verb know, as in Sam
knows that Jack ate the pizza. The passive is possible, as in Sam knows that the pizza was eaten by Jack. Another
clause type involves the infinitive form of the verb. The VP[inf] clause is simply a VP starting in the infinitive form, as in
the complement of the verb wish in Jack wishes to eat the pizza. An infinitive sentence S[inf] form is also possible
where the subject is indicated by a for phrase, as in Jack wishes for Sam to eat the pizza. Another important class of
clauses are sentences with complementizers that are wh-words, such as who, what, where, why, whether, and how
many. These question clauses, S[WH], can be used as a complement of verbs such as know, as in Sam knows whether
we went to the party and The police know who committed the crime.
e. What makes a good grammar?
Generality
The range of sentences the grammar analyzes correctly
Selectivity
The range of non-sentences it identifies as problematic
Understandability
Simplicity of the grammar itself.
Part-B
UNIT-I & II
2.(a) List various applications of NLP.
Text-based applications involve the processing of written text, such as books, newspapers, reports, manuals,
e-mail messages, and so on. These are all reading-based tasks.
Text-based natural language applications are:
Finding appropriate documents on certain topics from a database of texts
Extracting information from messages or articles on certain topics
Translating documents from one language to another
Summarizing texts for certain purposes
Machine Translation
Fighting Spam
Information Extraction
Summarization
Sentiment Analysis
Text Classification
(b) Draw the parse tree for the following sentence. the visitor saw the old painting in the den.
It is also possible to insert chart-like mechanisms to improve the efficiency of a grammar, although then
the simple correspondence between context-free rules and PROLOG rules is lost. It is worthwhile to try
some simple grammars written in PROLOG to better understand top-down, depth-first search.
or
3. (a) What are Auxiliary or Helping Verbs?
Helping verbs or auxiliary verbs such as will, shall, may, might, can, could, must, ought to, should, would, used to,
need are used in conjunction with main verbs to express shades of time and mood. The combination of helping
verbs with main verbs creates what are called verb phrases or verb strings.
(b) Discuss all the kinds of Auxiliaries with example? How to Identify an Auxiliary Verb?
There are two main types of verbs. Action verbs are used to depict activities that are doable, and linking verbs are
used to describe conditions. Both action verbs and linking verbs can accompany auxiliary verbs including the three
main ones: do, be, and have.
A main verb, also known as a base verb, indicates the kind of action or condition taking place. An auxiliary or helping
verb accompanies the main verb and conveys other nuances that help the reader gain specific insight into the event
that is taking place.
Three Common Auxiliary Verbs
There are just three common auxiliary verbs:
Have
Do
Be
Have
Have is a very important verb that can stand alone in all its tenses, including has, have, having, had, and hadnt or
had not. It is usually used to denote ownership, and it can also be used to discuss ability or describe appearance.
Have is also a very popular substitute for the verbs eat and drink. For example: Lets have dinner.
When used as an auxiliary verb, have is always teamed up with another verb to create a complete verb phrase,
making it easy to differentiate between uses.
Do
Do can be used as an action verb that stands alone in all its tenses, including to do, do, does, done, did and didnt,
doesnt or did not .
When used as an auxiliary verb, do is always paired up with another verb to create a complete verb phrase. In some
cases, it is used to add emphasis: I did put the garbage out! Do is often used to form questions and negated
clauses. It is also used in elliptical sentences, where the main verb is understood and is omitted as a result.
Be
Be or to be is an important verb that has a multitude of uses in English. It can be used as an action verb that
stands alone in all its tenses including be, to be, been, am, are, is, was, were, wasnt, was not arent, are not, werent
and were not.
When used as an auxiliary verb, be is always paired with another verb to create a complete verb phrase. It can be
singular or plural, present or past. Negative sentences are formed by adding the word not.
Modal Auxiliary Verbs
In addition to the three main auxiliary verbs, have, do, and be, there are additional auxiliary verbs. These are called
modal auxiliary verbs, and they never change form. A complete list of modal auxiliary verbs follows:
Can
Could
May
Might
Must
Ought to
Shall
Should
Will
Would
(c) Give some examples of multiple auxiliary?
There is considerable variation in the expression of definiteness across languages and some
languages do not express it at all. For example, in English definiteness is usually marked by the
selection of determiner. Certain determiners, such as a/an, many, any, either, and some typically
mark an NP as indefinite. Others, including the, this, every, and both mark the NP as definite.
or
5. . Write short notes on the following
a. Shift Reduce Parser.
Using techniques that encode uncertainty, so that the parser need not make an arbitrary choice and later
backtrack.
Rather, the uncertainty is passed forward through the parse to the point where the input eliminates all but
one of the possibilities.
If you did this explicitly at parse time, you would have an algorithm similar to the breadth-first parser.
All the possibilities are considered in advance, and the information is stored in a table that controls the
parser, resulting in parsing algorithms that can be much faster.
These techniques were developed for use with unambiguous context-free grammars.
Consider parsing "The man ate the carrot". The initial state of the parser is
Parse Stack Input Stack
(S0) (The man ate the carrot)
Looking up the entry in the table for state SO for the input ART
(the category of the word the), you see a shift action and a move to state S1:
Parse Stack Input Stack
(S1 ART S0) (man ate the carrot)
Looking up the entry for state S1 for the input N, you see a shift action
and a move to state S1:
Parse Stack Input Stack
(S1' N S1 ART S0) (ate the carrot)
Looking up the entry for state Si, you then reduce by rule 2.2, which removes the Si,,
N, 51, and ART from the parse stack and adds NP to the input stack:
b. POS
The process of assigning a part-of-speech or lexical class marker to each word in a corpus:
WORDS
TAGS
the
koala
put N
the V
keys P
on DET
the
table
To do POS tagging, first need to choose a set of tags. We Could pick very coarse (small) tagsets N, V, Adj, Adv.
More commonly used tags are Brown Corpus 87 tags more informative but more difficult to tag. Most commonly
used is Penn Treebank 47 tags.
c. Viterbi
The Viterbi algorithm is used to compute the most probable path (as well as its probability). It requires knowledge of
the parameters of the HMM model and a particular output sequence and it finds the state sequence that is most
likely to have generated that output sequence. It works by finding a maximum over all possible state sequences.
In sequence analysis, this method can be used for example to predict coding vs non--coding sequences.
In fact there are often many state sequences that can produce the same particular output sequence, but with
different probabilities. It is possible to calculate the probability for the HMM model to generate that output
sequence by doing the summation over all possible state sequences. This also can be done efficiently using the
Forward algorithm (or the Backward algorithm), which is also a dynamical programming algorithm. In sequence
analysis, this method can be used for example to predict the probability that a particular DNA region match the
HMM motif (i.e. was emitted by the HMM model). A HMM motif can represent a TF binding site for ex.
ADITYA COLLEGE OF ENGINEERING
PUNGANUR ROAD, MADANAPALLE-517325
IV-B.Tech (R13) II Sem - I Internal Examinations FEB-2017 (Objective) (CODE B)
(13A05802) NATURAL LANGUAGE PROCESSING (Computer Science & Engineering)
Name: Roll No:
2. What is a Discourse?
Any linguistic unit that consists of multiple sentences. It deals with how the immediately preceding sentence
can affect the interpretation of the next sentence.