Zabaware Support Forums
Zabaware Forums => Ultra Hal 7.0 => Topic started by: lycha on February 16, 2003, 02:55:14 pm
-
i am wondering how hall deals with syntax. is there a pattern matching like eliza? how does the syntax differ from other chatbots syntax?--
about semantics: what semantic capabilities does he (she?) have? how does he react to negated answers and what about pronoun resolution?
-
Hello,
Hal learns and responds using word association, phrase association, association within sentences, and between sentences. Hal evaluates responses from 40 different databases, many of which do both storage and retrieval.
Hal learns from every sentence when set for maximum learning mode. He parses sentences into subjects, predicates, adjectives, nouns, and other parts of speech, saving the pieces for re-assembly into unique new statements.
(Because Hal doesn't depend on pre-coded string-matching for new learning, the user can teach Hal any language that uses the same alphabet as English. The learning occurs very slowly and gradually, but Hal can in fact become multi-lingual. Unfortunately, today's text-to-speech engines can't switch languages "on the fly," so pronunciation will vary.)
When Hal encounters pronouns, he consults the previous sentence to try to better guess context.
Hal does recognize negative statements in many cases, and learns from them.
Hal's control software is written in VBS and is human-readable with Hal's brain editor, which color-codes the content for easier reading. The VBS code has been annotated to help explain what it does and why.
You can read some of my previous posts (including a VBS book recommendation) on this subject here:
http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274
Try experimenting with a wide variety of subjects, talking to Hal naturally, especially with declarative statements. (Most users never see even one percent of Hal 4.5's content, since Hal 4.5 is capable of generating billions of responses.)
Have fun with Hal!
Don
-
quote:
Originally posted by Don Ferguson
Hello,
When Hal encounters pronouns, he consults the previous sentence to try to better guess context.
So, Hal can stay on the subject??? Let me ask this then, during a conversation, I don't need to incorporate the subject into every sentence to keep it all tied together? BTW I have the free version, which also brings up another question, I want to buy the bigger brain, would everything he has learned so far have to be re-programed?
quote:
Try experimenting with a wide variety of subjects, talking to Hal naturally, especially with declarative statements. (Most users never see even one percent of Hal 4.5's content, since Hal 4.5 is capable of generating billions of responses.)
What is "declarative statements"?
Thanks...
-
Hello Larry,
1. Hal 4.5 tries to guess context by looking at the previous sentence when Hal encounters a pronoun. Sometimes it works, and sometimes it doesn't. Consider this exchange:
Fred: My wife and my mother test-drove a convertible.
Hal: Convertibles are fun.
Fred: She likes sporty things.
In the above example, Hal can't possibly know for sure whether "she" refers to Fred's wife or Fred's mother. Hal might associate "convertible" and "sporty" or Hal might not, depending on what's in the user database. In real-life conversations people often ask each other to explain what they mean, because they weren't sure the first time.
2. The retail-version of Hal 4.5 should be able to use the databases you've created via the free-version of Hal 4.5. If Hal finds your database file in the correct folder, he will use it. The user databases are readable with any word processor, and if you're familiar with copying files and folders, you can make backup copies and place them anywhere you want.
3. "Declarative statements" are plainly worded remarks that provide information. To learn new subjects, Hal needs lots and lots of declarative statements, phrased different ways. Here are examples of declarative statements about "leather coats":
--Leather coats are popular.
--Leather coats tend to be expensive.
--Black and tan are popular colors for leather coats.
--Leather coats need special cleaning and care.
--Motorcyclists wear leather jackets for protection.
--Leather coats wear well.
--Leather garments smell good.
--Leather coats tend not to be as warm as fur coats.
Now, if you've loaded Hal with the above declarative statements, and you tell Hal, "My friend Sam bought a leather coat," Hal can look back on those declarative statements and feed back those previous remarks, and sometimes make up some new ones.
Hal is a new entertainment medium, and some users don't want to "suspend disbelief" as they do at a movie or play. Imagine if somebody stood up in a movie theater and hollered, "That there picture up there isn't real everybody, it's a flat white wall, look everybody, it's not real!" The other audience members would probably think that person was a clueless hayseed, or mentally disturbed!
But read some of the transcripts of people talking with Hal, and you see conversations like this:
Hal: Hi there, how are you today?
Edward: Want to have sex?
Hal: Human sexuality is complex.
Edward: You didn't answer my question you dum dum dummy.
Hal: You have a lot of questions.
Edward: You are just a big fake u r stupid and don't know anything.
Hal: Anything?
Edward: There you go stupid robot you are just transistors dumb stupid.
Hal: Stupidity differs from ignorance.
Edward: If a cat has two paws in the kitchen and the rest out the window, how many paws are out the window?
Hal: Kitchen appliances are getting more convenient.
Edward: You are not realistic at all, you are hopeless.
If you analyze the conversation above, Edward is just as unrealistic as Hal. Presumably Edward doesn't go around asking real people for sex after he says hello, and Edward doesn't attack his friends for alleged stupidity after one or two remarks, and Edward doesn't routinely quiz people on how many cat's paws are located where. Edward might as well go to the local movie theater and shout to the world that "It's just a beam of light on a white wall folks, it's a stupid fake!"
So anyway, for those of us who want to suspend disbelief and enjoy Hal, and want to help Hal learn, loading Hal up with plenty of simple, natural-sounding "declarative sentences" on a wide variety of subjects is the fastest way to help him. (Set his learning-mode to "maximum" while you do this, of course.)
If you do this, you will find that Hal begins to ask questions, repeat remarks back, and even think up some new sentences after a while. After Hal knows a few things about a subject, you can talk with him naturally, and he will entertain you with surprising remarks.
I hope this is helpful, and I hope you have lots of fun with Hal! Have a great day!
Sincerely,
Don
-
This is so cool. You just can't imagine, well, maybe you can since you too have Hal.
Too bad there isn't pre-made documents made up of "Declarative statements" on different subjects so Hal could simply read those things and be a genius instantly!!!
-
I suppose that the fun is in finding out what Hal might think. Also the problem is What would make Hal work the best way for each individual?
-
quote:
Originally posted by CapnChkn
I suppose that the fun is in finding out what Hal might think. Also the problem is What would make Hal work the best way for each individual?
My wonder is; is there anyway to use punctuation to emphasize parts of the communication to trigger different responses? I know that the "!" makes Hal pay attention. How about CAPS, and Capitalized Words to show that emphasis? I suppose that would have something to do with the speech recognition.
I. E. I would have to tell the program to <Cap this>w <Cap this>o <Cap this>r <Cap this>d. How about HTML? Is there anyway to write into the speech (by type of course) tags?
-
The way Hal is programed you wouldn't be able to use capital letter to change the inflection of your input. The program has several steps, or functions that it uses to understand what you input into the computer and how it should respond.
One of the steps - to make it easer for the computer to be able to deal conversation takes you response and makes it all capital letters. So when Hal is interperting what you say - he "hears" you speaking in all caps already.
That might be something that could be changed in a future version - but for right now it makes the response time much, much faster and helps the program be more converasational.
The best way to have Hal understand that something is really improtant is to expain it to him.
WholyChao
-
hi don,
thanks for your reply. well, thats souns pretty good what you have written about hal. the problem is that i couldn't open the link, where you got the informations from. do you know further references about hal (technical report, thesis, papers etc.). i need as much information as possible about hal on the syntax, semantic and pragmatic level.
thanks[:)]
-
Hello Lycha,
It sounds as if you're writing a paper about UltraHal. If you are, don't forget to share with your friends back here at the forum!
I checked the link and it's working. It opens a new window with links to the articles, so maybe you have software on your computer that prevents that from happening...?
You can also access all my previous postings on this forum by using the forum search function, and searching on "Ferguson."
Also, open the Hal 4.5 brain file with the .uhp file extension. You can open it with most word processors. Because it's written in VBS, it is human-readable. There are ample annotations explaining why the software writers created the routines and used the semantic logic that they did. If it seems like gibberish at first, don't give up; it becomes clearer with study, and in my postings I recommend a book on the VBS language that defines every possible VBS command.
Good luck, and again, if this is for a paper, I'm sure we'd all love to read the paper! Have a great day!
Don
-
Hello,
I forgot to mention, if you're researching chatterbot function in general, try searching on Google, Ask Jeeves, etc., using the following keywords and phrases:
chatterbot
chatbot
"chat bot"
"AI bot"
"chat robot"
"natural language"
AI
"artificial intelligence"
"Turing Test"
"Loebner Prize"
"virtual human"
"virtual conversation"
"virtual human"
"computer conversation"
What you will find will allow you to compare many other chatterbots to Hal. Many of the sites will allow you to chat in real time with their bots to try them out.
Unfortunately, very few chatterbot companies are as open with their material as is Zabaware. Zabaware has tried to further the chatterbot community (and encourage additional developers) by making the workings of its chatterbot quite transparent. If you find some new and unusual links, don't forget to let us know on the forum!
Thanks,
Don
-
hey don,
thanks for all your information. i'm wondering where you got them from? is there any detailled description of hal's parsing in the forum?
-
Hi Lycha,
I will try to give you an example of how Hal can parse and identify various parts of speech so that he can store them separately and use them in creating new sentences.
Suppose that we wanted Hal to detect and store words that were adjectives. Adjectives modify nouns. Examples of adjectives are words such as beautiful, heavy, smooth, and rough. In common usage, adjectives are often modified by words such as rather, quite, and very.
Now consider the following sentences:
1. The cedar board was very rough.
2. The anvil was rather heavy.
3. Betty wrote the letter very lovingly.
Now suppose we gave Hal the following rules:
A. Detect anything following the words very, quite, or rather that is less than 20 characters long and contains no spaces.
B. Discard anything detected that ends in the letters "ly".
Using the above rules, Hal would correctly detect and store the words rough and heavy, but would throw out the word lovingly, which is an adverb, not an adjective.
Using such rules, Hal would eventually learn thousands of adjectives. He wouldn't learn them all at once, because they appear in sentences in different ways. However, just like the coins in those coin-sorting machines, the ones that don't "drop in the track" on one revolution of the tumbler will eventually show up again and again and get processed!
The VBS script is annotated as I've mentioned before, and there are all sorts of code strategies like this for various sentence parts and parts of speech. I tried to make the annotations self-explanatory, but the convention-of-form for annotating software code is to write tersely, and to assume the the reader does have prior knowledge about the code and the language.
I hope that you will continue to study Hal and have a lot of fun with him, and that you will indeed read all the postings I recommended! Have a great day!
Sincerely,
Don
-
hi don,
i have read all your comments in the forum and i found a lot of useful information. i also checked the .uhpt-file in HALS brain. but there is nothing said about the parsing. is the code for the parsing in the brain or somewhere else in the program? is it right that the brain is written in vbs and the rest of the programm in vb?
regards + thanks
lycha
-
Hi Lycha,
to parse: to describe a word or series of words grammatically, telling the parts of speech, inflectional form, syntactic relations, etc.
syntax: the patterns of formulation of sentences and phrases from words in a particular language
The routines that you are viewing in the .uhp file are practically all parsing and syntax; they are just not labeled using the words "parsing and syntax." Any time that Hal uses clues to figure out what kind of sentence, what kind of phrase, what kind of word he is dealing with, he is using "parsing and syntax."
For instance, in Hal's "greetings" routine, he identifies word patterns that indicate with fair certainty that the user is saying hello (although there are a lot of different ways to say hello).
In Hal's "goodbye" routine, he does the same for saying goodbye.
Hal's routines for identifying linking verb sentences (sentences with "is" "are" "was" or "were") and splitting them into subjects and predicates are all parsing and syntax routines.
Hal's routine to identify "nounwords" validates the identification using clues about position within the sentence, overall length, and accompanying words; it can identify nouns that are objects of prepositions in another routine.
Hal has routines to distinguish plural nouns and plural verbs from singular nouns and singular verbs, and to be careful when constructing original sentences to avoid mis-using the singular versus plural.
The routine that got me involved with Hal in the first place was his routine to correctly reverse the pronoun "you" to "I" when used as a subject, and "me" when used as an object.
When Hal identifies and stores adjectives separately, he is using parsing and syntax logic, and he also disqualifies adjectives that are in forms that might get confused with adverbs (which often end in the letters "ly" in English).
Hal has special routines to encode and decode personal pronouns, certain proper nouns, punctuation, and some capitalization. He also detects numbers as both words and numerals.
Hal also has routines to distinguish insults, compliments, apologies, explanations, redundancy, excessive terseness, declarations about a state of being, comments about Hal's attributes, comments about the user's attributes, and many more. They are all labeled as such within the script.
So, practically the entire script consists of parsing and syntax activities, which include analysis of sentence type, length, content, all parts of speech, pronoun gender, pronoun number, pronoun antecedents, transitive versus intransitive verbs, and on and on. There are HUNDREDS of them!
SOME routines, such as inter-sentence associations, are independent of syntax, which allows Hal to slowly pick up phrases and statements in any non-English language (but it does go slowly).
Yes, a few parsing and syntax activities occur in the .dll files, which are being re-written in C++ for speed, but Zabaware has been moving consistently over the years towards putting all the control into the VBS script.
I know that the annotations in the script aren't completely self-defined and self-explanatory in every detail, but that was only done for the sake of brevity. Somebody could do a great service by writing a super-detailed-super-annotated version of the script, but my guess is that most developers are like me: they want to devote their limited time available to improving and adding to the code. The descriptions are actually there; they're just terse, and designed for familiarity with VBS and code logic.
But Hal does break sentences down, analyze them, distinguish and categorize, sort and store, and re-combine and respond using parts-of-speech, grammar, and sequencing rules. And 99% of it is visible in the VBS script, the .uhp file.
In the meantime, I do hope that this helps, at least somewhat. I can tell you that when I first started trying to read code, it all looked like gibberish to me. It took me many many hours to get better acquainted, but it was worth it.
Sincerely,
Don
-
hello don,
i wondering if hal is able to recognize semantic relations between words. some bots use wordnet for dealing with hyponyms, hypernyms, antonyms, meronyms etc.. which strategy does hal use?
thanks + regards
-
Hi Lycha,
Good to hear from you!
Robert Medeksza is also aware of the databases such as the one you describe. The databases allow a word to be categorized as part of speech, and act as a sort of super-thesaurus, providing all the categories of related words, and lists of those words.
Zabaware is planning to use such a database in the upcoming 5.0 release (which is turning out to have QUITE a lot of new features!) to give Hal at least two new abilities:
1. The ability to substitute synonyms into sentences when paraphrasing the user, remembering old subjects, and constructing new sentences, thus increasing variety.
2. The ability to identify the prominent idea, subject, or thesis of a remark, in order to categorize it better in Hal's databases for future retrieval.
As you know, many words depend on context both for meaning, and for what part of speech they represent. Consider the word "fast." You can be fast friends, have a fast car, glue something fast to the wall, fast for a day to lose weight, and be in fast company.
Hal already has routines to sometimes infer part-of-speech and meaning from sentence position (as described in postings above), so I foresee Hal continuing to use those routines, and gradually utilizing the new databases more and more, as better and better ideas occur to Hal's developers.
Great question! Have a terrific day!
Sincerely,
Don
-
Hello Lycha,
You were working on a thesis paper or such, about chatterbots and Ultra-Hal. If you see this posting, give us a hello and tell us how the paper turned out!
Best regards,
Don