Communication
Communication can be done in a variety of different ways.
Speech: Identify the words
Handwriting: Identify the words
Keyboard: The words are easily identified
Desirable to decide on the proper device
Commander Data communicates with a computer by reading the screen. For fast transfers he asks computer to scroll faster. Probably not the right device
In any case, we get a list of words and we want to interprete it.
Languages:
A very abstract concept: bunch of symbols and associate them with physical objects. Sometimes we even describe scenarios that may have no physical counterpart
A sign of intelligence: advanced language
Grammar for the language
EBNF to describe the grammar
The book uses slightly different notations
terminal symbols are bold
S -> NP VP
Lexicon is similar to dictionary gives you the vocabulary
Generally we will use a restricted form of English
Using EBNF is not enough, because it doesnt provide semantics
We can represent EBNF using first order logic.
page 667
S -> NP VP
NP(s1) and VP(s2) => S(append(s1,s2).
Definite clause grammar (DCG) page 667
Rules for translating EBNF to DCG are given at the bottom of page 667
We can extend the DCG by adding the semantics
Page 668, shows how you can use FOL to combine syntax with semantics
In one stroke, you can check the syntax and provide the semantics at the same time.
We add an extra argument to the non-terminal symbols corresponding to the semantics
(s = [sem]) and 0<=sem<=9 => Digit(sem,s).
Digit(sem,s)=>Number(sem,s)
Number(sem1,s1) and Digit(sem2,s2) and sem = sem1*10+sem2 =>
Number(sem,Append(s1,s2)).
We can check the syntax and find the semantics at the same time. Look at the parse tree from the blackboard
The first-order logic can be tedious, so we can translate it back to DCG which EBNF plus semantics. The semantics is mentioned using curly braces.
We have to go beyond the syntax oriented languages used in the compiler theory, because processing semantics of programming language was a lot more complicated than interpreting the meaning of a single sentence.
A more comlicated language that describes arithmetic expressions is given on page 673.
The area of research is generally referred to as NLP, natural language processing
Machine translation
University of Montreal: translating English weather reports to French
A very restricted form of English was used.
The persons writing the English report were experts and knew exactly how to phrase English reports so that they will make sense in French.
The paragraph on page 692, shows you how translation of a general paragraph can be difficult to follow.
Another problem with translation is that there are subtle differences between the languages.
You have to look at the context.
Look at the difference between open and OPEN and its correspondence in German from page 692-693.
Instead of hiring a bilingual person hire an editor that fixes the translation. much cheaper.
Instead of making people write programs in complicated query language, provide an NLP interface
Some queries may not work but if they are reformulated they may give the correct response.
Database access using NLP is not a hotly pursued area anymore. Menu driven, GUI interfaces, object oriented databases may make the retrieval more convenient than NLP.
NLP is more and more being used in information retrieval:
Information = Data + semantics
Information may not be organized in an orderly way like a database
A document is written based on the information that needs to be conveyed.
If you want to retrieve this document, you need to interprete the document and decide whether it is relevant to the information needs of the user.
The document is not going to be rewritten to suit the specifications of the retrieval systems.
Early IR systems used Boolean queries
(term1 and not term2) or (term3 and term4)
dont work very well
We will get only two classes: relevant and nonrelevant documents
Probably thousands of relevant documents. We need to rank them based on the relevance.
Vector-space model
Represent the document as a vector:
0.89 AI + 0.56 IR + 0.8 Database + 0.3 NN
Queries are similarly issued as vectors:
0.9 NN + 0.1 AI + 0.01 Database
Vector product and determine the relevance value
0.9*0.3+0.1*0.89+0.01*0.8+0*0.56=0.367
Then the documents will be ranked according to the relevance value.
Show user some of the sample documents and ask him to rank them and then decide what the user wants and search the entire document collection. User doesn have to formulate the query.
Intelligent agents on the internet definitely need a better way of deciding what is relevant
For documents of substantial importance, a human expert can decide the catgory or the keywords and weights for the keywords. SO the intelligent agents have easier time locating the information.