0% found this document useful (0 votes)
148 views11 pages

Unit V Ai Notes

Speech acts enable complex communication through language. They allow agents to query each other, inform each other about the world, request actions, acknowledge requests, and promise plans. The components of communication are intention, generation, synthesis, perception, analysis including syntactic, semantic and pragmatic interpretation, disambiguation, and incorporation. Parsing involves finding a parse tree for an input string and can be done using top-down or bottom-up search methods.

Uploaded by

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

Unit V Ai Notes

Speech acts enable complex communication through language. They allow agents to query each other, inform each other about the world, request actions, acknowledge requests, and promise plans. The components of communication are intention, generation, synthesis, perception, analysis including syntactic, semantic and pragmatic interpretation, disambiguation, and incorporation. Parsing involves finding a parse tree for an input string and can be done using top-down or bottom-up search methods.

Uploaded by

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

Artificial Intelligence

Question and Answers



(1) Define communication.
Communication is the intentional exchange of information brought about by the production and
perception of signs drawn from a shared system of conventional signs. Most animals use signs to
represent important messages: food here, predator nearby etc. In a partially observable world,
communication can help agents be successful because they can learn information that is observed or
inferred by others.
(2) What is speech act?
What sets humans apart from other animals is the complex system of structured messages known as
language that enables us to communicate most of what we know about the world. This is known as
speech act.
pea!er" hearer" and utterance are generic terms referring to any mode of communication.
The term word is used to refer to any kind of conventional communicative sign.
!" What are the capa#ilities gained #$ an agent from speech act?.
Quer$ other agents about particular aspects of the world. This is typically done by
asking #uestions: Have you smelled the wumpus anywhere?
Inform each other about the world. This is done by making representative statements:
There's a breeze here in 3 4. $nswering a #uestion is another %und of informing.
%e&uest other agents to perform actions: Please help me carry the gold. &ometimes
indirect speech act a re#uest in the form of a statement or #uestion" is considered
more polite: I could use some help carrying this. $n agent with authority can give
commands !lpha go right" #ravo and $harlie go le%l&' and an agent with power can
make a threat (ive me the gold' or else&. Together, these kinds of speech acts are called
directi'es.
Ac!nowledge re#uests: ().
*romise or commit to a plan: I'll shoot the wumpus" you grab the gold.

(+) Define formal language.
A formal language is defined as a possibly infinite" set of' strings. (ach string is a concatenation of
terminal s$m#ols" sometimes called words. )or example, in the language of first*order logic, the terminal
symbols include $ and %, and a typical string is +% $ ,.+ . )ormal languages such as first*order logic
and -ava have strict mathematical definitions. This is in contrast to natural languages" such
as .hinese, /anish, and (nglish, that have no strict definition but are used by a community.
(,) Define a grammar.
$ grammar is a finite set of rules that specifies a language. )ormal languages always
have an official grammar, specified in manuals or books. 0atural languages have no official
grammar, but linguists strive to discover properties of the language by a process of scientific
in#uiry and then to codify their discoveries in a grammar.
(-) What are the component steps of communication? ./plain with an e/ample.
0he component steps of communication
$ typical communication episode, in which speaker & wants to inform hearer 1 about proposition
% using words W, is composed of seven processes:
1) Intention. &omehow, speaker & decides that there is some proposition % that is worth
saying to hearer 1. )or our example, the speaker has the intention of having the hearer know
that the wumpus is no longer alive.
2) 1eneration. The speaker plans how to turn the proposition % into an utterance that
makes it likely that the hearer, upon perceiving the utterance in the current situation, can infer
the meaning % or something close to it". $ssume that the speaker is able to come up with
the words +The wumpus is dead,+ and call this ).
2) $nthesis. The speaker produces the physical reali2ation )' of the words ). This
can be via ink on paper, vibrations in air, or some other medium. In )igure 33.4, we show
the agent synthesi2ing a string of sounds )' written in the phonetic alphabet defined on
page 567: +8thaxwahmpaxsih2dehd9.+ The words are run together: this is typical of #uickly
spoken speech.
+) *erception. 1 perceives the physical reali2ation W' as )i and decodes it as the words
)*. When the medium is speech, the perception step is called speech recognition3 when it is
printing, it is called optical character recognition.
,) Anal$sis. 1 infers that )* has possible meanings PI' . . . , P'.
We divide analysis into three main parts:
a" s$ntactic interpretation (or parsing",
b" emantic interpretation" and
c"*ragmatic interpretation.
*arsing is the process of building a parse tree for an input string, as shown in
)igure 33.4. The interior nodes of the parse tree represent phrases and the leaf nodes represent
words.
emantic interpretation is the process of extracting the meaning of an utterance as
an expression in some representation language. )igure 33.4 shows two possible semantic
interpretations: that the wumpus is not alive and that it is tired a collo#uial meaning of
dead". ;tterances with several possible interpretations are said to be am#iguous.
*ragmatic interpretation takes into account the fact that the same words can have different
meanings in different situations.
-) Disam#iguation. 4 infers that + intended to convey %, where ideally P' < %".
Most speakers are not intentionally ambiguous, but most utterances have several feasible
interpretations.. $nalysis generates possible interpretations:if more than one
interpretation is found, then disambiguation chooses the one that is best.
=" Incorporation. 4 decides to believe P' or not". $ totally naive agent might believe
everything it hears, but a sophisticated agent treats the speech act as evidence for %,, not
confirmation of it.
%utting it all together, we get the agent program shown in )igure 33.3. 1ere the agent
acts as a robot slave that can be commanded by a master. >n each turn, the slave will answer
a #uestion or obey a command if the master has made one, and it will believe any statements
made by the master. It will also comment once" on the current situation if it has nothing
more pressing to do, and it will plan its own action if left aloine.
1ere is a typical dialog:
?>@>T &A$B( M$&T(?
I feel a bree2e. Co to 43.
0othing is here. Co north.
I feel a bree2e and I smell a stench
and I see a glitter. Crab the gold.
)ig 33.4 shows the seven processes involved in communication,using the example
sentence DThe wumpus is deadE.
(5) Define a 6e/icon and grammar for language consisting of a small fragment of .nglish.
The next step is to combine the words into phrases. We will use five nonterminal symbols
to define the different kinds of phrases: sentence +&' noun phrase 0%", verb phrase B%",
prepositional phrase %%", and relative clause e el clause".' )igure 33.F shows a grammar
for l o , with an example for each rewrite rule. lo generates good (nglish sentences such as
the following:
-ohn is in the pit
The wumpus that stinks is in 3 3
(7) What is parsing? ./plain the top down parsing method.
%arsing is defined as the process of finding a parse tree for a given input string.
That is, a call to the parsing function %$?&(, such as
should return a parse tree with root & whose leaves are +the wumpus is dead+ and whose
internal nodes are nonterminal symbols from the grammar (o.
Parsing can be seen as a process o, searching ,or a parse tree.
There are two extreme ways of specifying the search space and many variants in between".
)irst, we can start with the + symbol and search for a tree that has the words as its leaves. This is
called top8down parsing
&econd, we could start with the words and search for a tree with root &. This is called #ottom8up
parsing.
Top*down parsing can be precisely defined as a search problem as follows:
The initial state is a parse tree consisting of the root & and unknown children: 8&: GI.
In general, each state in the search space is a parse tree.
The successor function selects the leftmost node in the tree with unknown children. It
then looks in the grammar for rules that have the root label of the node on the left*hand
side. )or each such rule, it creates a successor state where the G is replaced by a list
corresponding to the right*hand side of the rule..

(9) :ormulate the #ottom8up parsing as a search pro#lem.
The formulation of bottom*up parsing as a search is as follows:
The initial state is a list of the words in the input string, each viewed as a parse tree
that is Hust a single leaf node*for example: ;the" wumlpus" is" dead<. In general, each
state in the search space is a list of parse trees.
The successor function looks at every position i in the list of trees and
at every righthand side of a rule in the grammar. If the subse#uence of the list of trees starting at
i matches the right*hand side, then the subse#uence is replaced by a new tree whose
category is the left*hand side of the rule and whose children are the subse#uence. @y
+matches,+ we mean that the category of the node is the same as the element in the righthand
side. )or example, the rule !rticle I the matches the subse#uence consisting
of the first node in the list ;the" wumpus" is" dead<" so a successor state would be
--!rticle.the<" wumpus" is" dead<.
The goal test checks for a state consisting of a single tree with root &.
(1=) What is d$namic programming?
)orward .haining on graph search problem is an example of dynamic programming.
&olutions to the sub problems are constructed incrementally from those of smaller
sub problems and are cached to avoid recomputation.
(11) Construct a parse tree for >?ou gi'e me the gold@ showing the su# categories
of the 'er# and 'er# phrase.
(12) What is semantic interpretation? 1i'e an e/ample.
&emantic interpretation is the process of associating an )>A expression with a phrase.
(12) Construct a grammar and sentence for >Aohn lo'es Bar$@
(1+) Construct a parse tree for the sentence >.'er$ agent smells a Wumpus@
(1,) Define le/ical"s$ntactic" and semantic am#iguit$.
6e/ical am#iguit$, in which a word has more than one meaning. Aexical ambiguity is
#uite common: +back+ can be an adverb go back", an adHective back door", a noun the
back of the room" or a verb back up your files". +-ack+ can be a name, a noun a playing
card, a six*pointed metal game piece, a nautical flag, a fish, a male donkey, a socket, or a
device for raising heavy obHects", or a verb to Hack up a car, to hunt with a light, or to hit a
baseball hard".
$ntactic am#iguit$ also known as structural ambiguity" can occur with or without
lexical ambiguity. )or example, the string +I smelled a wumpus in *'*/ has two parses: one
where the prepositional phrase +in 3,3+ modifies the noun and one where it modifies the
verb. The syntactic ambiguity leads to a semantic ambiguity, because one parse means that
the wumpus is in 3,3 and the other means that a stench is in *'*. In this case, getting the
wrong interpretation could be a deadly mistake.
emantic am#iguit$ can occur even in phrases with no lexical or syntactic ambiguity.
)or example, the noun phrase +cat person+ can be someone who likes felines or the lead of
the movie $ttack of the .at %eople. $ +coast road+ can be a road that follows the coast or
one that leads to it.
(1-) What is disam#iguation?
Disam#iguation
0isambiguation is a 1uestion o, diagnosis. The speaker's intent to communicate
is an unobserved cause of the words in the utterance, and the hearer's Hob is to work
backwards from the words and from knowledge of the situation to recover the most likely
intent of the speaker.. &ome sort of preference is needed because syntactic and semantic
interpretation rules alone cannot identify a uni#ue correct interpretation of a phrase or
sentence. &o we divide the work: syntactic and semantic interpretation is responsible for
enumerating a set of candidate interpretations, and the disambiguation process chooses the
best one.
(15) What is discourse?
A discourse is any string of language*usually one that is more than one sentence long.
Textbooks, novels, weather reports and conversations are all discourses. &o far we have
largely ignored the problems of discourse, preferring to dissect language into individual
sentences that can be studied in vitro. We will look at two particular subproblems:
reference resolution and coherence.
%eference resolution
%eference resolution is the interpretation of a pronoun or a definite noun phrase that
refers to an obHect in the world. The resolution is based on knowledge of the world and of
the previous parts of the discourse. .onsider the passage +-ohn flagged down the waiter.
1e ordered a hani sandwich.+
To understand that +he+ in the second sentence refers to -ohn, we need to have understood
that the first sentence mentions two people and that -ohn is playing the role of a customer
and hence is likely to order, whereas the waiter is not.
0he structure of coherent discourse
If you open up this book to 4J random pages, and copy down the first sentence from each
page. The result is bound to be incoherent. &imilarly, if you take a coherent 4J*sentence
passage and permute the sentences, the result is incoherent. This demonstrates that
sentences in natural language discourse are #uite different from sentences in logic. In
logic, if we T(AA sentences $, # and $ to a knowledge base, in any order, we endl up
with Ithe conHunction ! $ # ! $. In natural language, sentence order matters: consider
thKed ifference between +Co two blocks. Turn right.+ and +Turn right. Co two blocks.+
(17) What is grammar induction?
1rammar induction is the task of learning a grammar from data. It is an obvious task
to attempt, given that it has proven to be so difficult to construct a grammar by hand and
that billions of example utterances are available for free on the Internet. It is a difficult task
because the space of possible grammars is infinite and because verifying that a given grammar
generates a set of sentences is computationally expensive.
1rammar induction can learn a grammar from examples, although there are limitations
on how well the grammar will generali2e.
(19) What is information retrie'al?
Information retrie'al is the task of finding documents that are relevant to a user's need for
information. The best*known examples of information retrieval systems are search engines
on the World Wide Web. $ Web user can type a #uery such as 8$I book9 into a search engine
and see a list of relevant pages. $n information retrieval henceforth I?" system can be
characteri2ed by:
4" A document collection. (ach system must decide what it wants to treat as a document:
a paragraph, a page, or a multi*page text.
2) A &uer$ posed in a &uer$ language. The #uery specifies what the user wants to know.
The #uery language can be Hust a list of words, such as 8$I book9: or it can specify
a phrase of words that must be adHacent, as in 8+$I book+9: it can contain @oolean
operators as in ;AI !20 book9: it can include non*@oolean operators such as 8$I book
&IT(:www.aaai.org9.
2) A result set. This is the subset of documents that the I? system Hudges to be rele'ant to
the #uery. @y relevant, we mean likely to be of use to the person who asked the #uery,
for the particular information need expressed in the #uery.
F" A presentation of the result set. This can be as simple as a ranked list of document
titles or as complex as a rotating color map of the result set proHected onto a three dimensional
space.
(2=) What is clustering?
.lustering is an unsupervised learning problem. ;nsupervised clustering is the problem of
discerning multiple categories in a collection of obHects. The problem is unsupervised because the
category labels are not given.
(xamples
We are familiar with terms such as Dred giantE and Dwhite dwarfE,but the stars do not carry these
labels L astronomers had to perform unsupervised clustering to identify these categories.
(21) What is agglomerati'e clustering?
$gglomerative clustering creates a tree of clusters going all the way down to the individual
documents. We begin by considering each document as a separate cluster. Then we find the
two clusters that are closest to each other according to some distance measure and merge
these clusters into one. The distance measure between two clusters can be the distance to
the median of the cluster. $gglomerative clustering takes time >n
3
",where n is the
number of documents.
(22) What is )8means clustering?
)8means clustering creates a flat set of exactly k*categories.It works as follows :
i) %ick M documents at random to represent the M categories.
ii) $ssign every document to the closest category.
iii) .ompute the mean of each cluster and use M*means to represent the new value
of the M categories.
iv" ?epeat the steps ii" and iii" until convergence.
M*means takes >n"
(22) What is information e/traction?
Information e/traction is the process of creating database entries by skimming a text and
looking for occurrences of a particular class of o#Cect or e'ent and for relationships among
those o#Cects and e'ents.
We could be trying to extract instances of addresses from web pages, with database fields
for street, city, state, and 2ip code: or instances of storms from weather reports, with fields for
temperature, wind speed, and precipitation. Information extraction systems are mid*way between
information retrieval systems and full*text parsers, in that they need to do more than consider a
document as a bag of words, but less than completely analy2e every sentence.
The simplest type of information extraction system is called an attribute-based s$stem
because it assumes that the entire text refers to a single obHect and the task is to extract
attributes of that obHect.
)or example, the problem of extracting from the text +4=in &NC$ Monitor for only O3F7.77+
the database relations given by
3 m m ( $omputer3onitors ! +izem' Inchesl4&& ! Pricem' 5*46.66&&
! 7esolutionm' 8*9: ; 8:*4& .
&ome of this information can be handled with the help of regular expressions, which define a
regular grammar in a single text string. ?egular expressions are used in ;nix commands such
as grep, in programming languages such as %erl, and in word processors such as Microsoft
Word.
(2+) What is machine translation? ./plain different t$pes.
Bachine translation is the automatic translation of text from one natural language the source" to
another the target". This process has proven to be useful for a number of tasks, including the
following:
1. %ough translation" in which the goal is Hust to get the gist of a passage. ;ngrammatical
and inelegant sentences are tolerated as long as the meaning is clear. )or example, in
Web surfing, a user is often happy with a rough translation of a foreign web page.
&ometimes a monolingual human can post*edit the output without having to read the
source. This type of machine*assisted translation saves money because such editors can
be paid less than bilingual translators.
3. %estricted8source translation, in which the subHect matter and format of the source
text are severely limited. >ne of the most successful examples is the T$;M*M(T(>
system, which translates weather reports from (nglish to )rench. It works because the
language used in weather reports is highly styli2ed and regular.
!. *re8edited translation, in which a human preedits the source document to make it conform
to a restricted subset of (nglish or whatever the original language is" before
machine translation. This approach is particularly cost*effective when there is a need to
translate one document into many languages, as is the case for legal documents in the
(uropean .ommunity or for companies that sell the same product in many countries.
?estricted languages are sometimes called +.aterpillar (nglish,+ because .aterpillar
.orp. was the first firm to try writing its manuals in this form. Nerox defined a language
for its maintenance manuals which was simple enough that it could be translated
by machine into all the languages Nerox deals with. $s an added benefit, the original
(nglish manuals became clearer as well.
F. 6iterar$ translation, in which all the nuances of the source text are preserved. This is
currently beyond the state of the art for machine translation.
(2,) Draw a schematic for a machine translation s$stem for .nglish to :rench.

You might also like