Download BNF and Semantic Networks: Representing Knowledge in Artificial Intelligence and more Slides Artificial Intelligence in PDF only on Docsity!
Introduction
1
In Science, initially both information and knowledge were represented with the same tools, mostly math, logical relations and graphs. As the difference between the two was more clearly defined:
- Information was represented simple in terms of files and data bases.
- Alternative ways had to be defined to represent knowledge:
- Data structures
- Data abstraction
BNF
2
You have been already exposed to the use of the BNF (Backus Naur Form to represent the syntax of an artificial language.
Yet the BNF as a grammar can also be used beyond artificial languages to parse and obtain the recognition/generation of natural language
BNF’s are only the beginning yet due to its powerful recursive representation we can get a good insight from them. Let us briefly review two examples of them
BNF syntactical
4
|
=> “ ( “ “ ) ” |
|
• => { a valid variable name such as dataB, etc.}
BNF with a bit of semantics
5
- => “=“
- => [ “+” | “-” ]
- => [ “*” | “/” ]
- => “( “ “)” | <var/constant>
- <var/value> => |
- => { a valid variable name such as dataB,
etc.}
- => { a valid value such as 0.45, 56, etc. }Docsity.com
BNF: the use of dictionaries
7
• =>
- => { a valid verb in the English Language }
- - => { a valid article in the English Language } - => { a valid adjective in the English Language } - => { a valid noun in the English Language }
BNF:
the use of dictionaries
8
Use a complete set of dictionaries for each element of a grammar and looking for the best match is an initial approach of understanding text.
- VERBS { a valid verb in the English Language }
- ARTICLES { a valid article in the English Language }
- ADJECTIVES { a valid adjective in the English Language
}
- NOUNS { a valid noun in the English Language }
Question/Answering system with a limited and defined context have used this approach for many years with some limited success/ They also benefit from the special Docsity.com
Applying Grammars
10
An alternative line of research came from the effort of psychologists and linguists, for them both information and knowledge are nothing more than associations in our minds. And so through experience, we associate concepts with other concepts. Cold White Snowman Slippery Ice
Snow
Don ’ t forget: If the association is an equality then it is information, else it is knowledge since it requires an implication
11
Semantic network developed by Collins and Quillian in their research on human information storage and response times
An example
Semantic Networks
13
Advantages of Semantic Networks:
- Information can be stored at the highest level of abstraction If we need to specify a concept in more detail, we do it after inheriting the features of the more general concept. Example: describe a particular type of bird.
- Knowledge is based on association of concepts.
- Can be represented as graphs (nodes facts or concepts, links relations).
- A semantic network is an irregular graph that has concepts in vertices and relations on arcs.
- Relations can be ad-hoc, but they can also be quite general, for example, “is a” ( ISA), “a kind of” ( AKO ), “an instance of”, “part of”.
- Relations often express physical properties of objects (colour, length, and lots of others).
- Most often, relations link two concepts.
Famous Imitation Games
1960s ELIZA, PARRY
Rogerian psychotherapist
1970s SHRDLU
Blocks world chat
1990s Loebner prize
http://www.loebner.net/Prizef/loebner-prize.html
ELIZA limitation and concerns
- Eliza used simple pattern matching
- “Well, my boyfriend made me come here”
- “ Your boyfriend made you come here?”
- Eliza written by Joseph Weizenbaum
- Weizenbaum so upset at credibility of users…
- his secretary wanted to use it only in private
- psychotherapists excited at prospect of Eliza-booths
- … he wrote a book to debunk the possibilities
- “Computer Power and Human Reason”
- WHO ELSE IN YOUR FAMILY TAKES CARE OF YOU? My father. YOUR FATHER You are like my father in some ways. WHAT RESEMBLANCE DO YOU SEE? You are not very aggressive, but I think you don ’ t want me to notice that. WHAT MAKES YOU THINK I AM NOT VERY AGGRESSIVE? You don ’ t argue with me. WHY DO YOU THINK I DON ’ T ARGUE WITH YOU? You are afraid of me. DOES IT PLEASE YOU TO THINK I AM AFRAID OF YOU? My father is afraid of everybody. WHAT ELSE COMES TO MIND WHEN YOU THINK OF YOUR FATHER Bullies DOES THAT HAVE ANYTHING TO DO WITH THE FACT THAT YOUR BOYFRIEND MAKE YOU COME HERE? (^) 19
Is ELIZA that impressive?
When we look at how Eliza works, this conversation
seems less impressive.
If pattern matches then give stored response Otherwise give general purpose response
(X me Y) ---> (X you Y) (I remember X) ---> (Why do you remember X just now?) (My {family-member} is Y) ---> (Who else in your family is Y?) (X {family-member} Y) ---> (Tell me more about your family)