Complex Language Understanding & Execution (CLUES) Engine

  • 107 Replies
  • 30225 Views
*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Complex Language Understanding & Execution (CLUES) Engine
« on: August 11, 2010, 11:26:53 pm »
Hello all.. I'm one of the 'new guys' and thought I'd tell you guys about my bot and some results I've had with it so far.

So... first off, I don't have a chatting bot just yet, I'm still in the processing of building the many, many components of its engine.   The entire project is coded in Perl and it is a free form grammar analysis engine.

Currently, the engine can take in a single line of user input, delimited of course by newline charactor (or carriage-return/line-feed on windows), produce all possible grammatical interpretations, and for each of those, using what I'm calling 'world knowledge', select the one the user must have meant.

Some early results are extremely promising.   For example, since the engine knows that people wear pajamas, and generally animals do not, it can correctly parse...

          "While I was in Africa, I shot an elephant in my pajamas."

since, grammatically this could mean either "I" was in pajamas or "an elephant" was in pajamas.    The bot knows that "I" is a pronoun and thus probably refers to a human.    It knows that pajamas is an instance of clothing.   It knows that humans wear clothes more generally than animals.

The status of my project is as follows.     I am currently writing the logic which translates the many, many possible ways a meaning can be conveyed, and by that I mean, not only different words, but also different sentence structures.     One basic **meaning** can be mapped to many sentence structures and words.    NOTE: I am not doing this by matching thousands of 'templates', but instead parsing the input sentence, into grammar parse trees, where, if one word can be say a noun or a verb, depending on CONTEXT and what MEANING the set of words have together.

Once that is done, the 'meaning' is fed into all possible 'reactor' scripts.   Each reactor script deals with one meaning, or concept.   Thus, the internal inference engine only deals with clear definitions.... no reactor ever has to deal with any english (or later, any language) ambiguity.  

State will also be maintained between user + pc statements.      So that the *meaning*,  not only of the latest user input, but the meaning of the conversation, as a whole, is taken into account, by the reactors.

 
Strong AI features of CLUES (which are demonstrated in the engine's ability to understand the complex, free form input example given above)......
 
    * NOT simply keyword or keyphrases, FULL INPUT STRING UNDERSTANDING
 
    * NOT simply respond to last input, take entire conversation into consideration
 
    * uses grammar rules to 'brain storm' all possible interpretations
 
    * uses knowledge of the world to narrow down those possiblites, to 'zero in' and pick the correct meaning the user meant.
 
    * combines knowledge base, and logic for specific subject talked about
 
« Last Edit: August 13, 2010, 02:38:59 pm by victorshulist »

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #1 on: August 14, 2010, 09:22:10 pm »
Complex stuff Victor, sounds like you are getting somewhere though.  I will follow with interest.  If you need testers then this is a good place to find them.  I'll leave the technical discussion to those that have the greater understanding of what an AI must do  :o

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #2 on: August 15, 2010, 01:21:13 am »
Thanks Freddy.   I am very excited about this and so far the results are extremely promising.   I have MOUNTAINS of work to do, and the bot must learn so VERY MUCH about the world, but it is coming along.

The more information about the world I give it, in the proper format of course, the more it can figure out which way to parse a given sentence.

The documentation so far is extensive !   It has four stages of processing :

(a) morphology (knowing how 'run', 'ran', 'running' , 'runnable' are related)
(b) grammar (how to determine all possible tree structures)
(c) concept inference rules (what meaning of a given word is being used in each case)
(d) reactors (once we know exactly what user is saying, find the applicable code to run to deduce a result, and thus a response)

in addition to those stages of processing, the data sources are:
(a) user input line , latest and all this session and previous sessions
(b) knowledge base
(c) conversation state

The 'Complex' in the name suggests of course natural language, in contrast to  'easier to parse' languages, like artificial (computer programming) languages.

Each part will need to be tested.   I'm awhile away from that right now, but I am hoping by the end of the year to have a demo on utube.

Then, later into next year, I am going to have a "limited and controlled" version of the turing test right here at my house.    My bot versus my wife lol.   And my nephew will be the judge.    By limited I mean that I am not allowing for spelling errors in this first test.   Unless all words are known, the web application won't allow the string to be sent to neither my wife or my bot.

Later, I will add spelling and "closest match" type functionality.   But for the core NLP, I don't want to worry too much about that.

I'll keep this in mind though, for testers.  Thanks

*

Bragi

  • Trusty Member
  • ********
  • Replicant
  • *
  • 564
    • Neural network design blog
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #3 on: August 15, 2010, 05:38:12 pm »
Hello victorshulist. You definitely know you way around grammar.
Welcome on this side by the way.

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #4 on: August 15, 2010, 08:36:29 pm »
Well, I spent 3 solid months re-learning every aspect of the English language, in excessive detail, as part of this latest chatbot engine design of mine  :)

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #5 on: September 13, 2010, 01:22:32 pm »
3:20 pm 12-Sept - I have just completed all the grammar rules of chapter 21 of my grammar book.  CLUES now understands sentences with:

- past participle phrases
- present participle phrases
- perfect participle phrases

It’s interesting to see how the parse trees come out. 

Example

      “I have been sitting here for an hour”

looks like this…

pos = simple-sentence
num-predicate = 1
subject.noun1.val = i
subject.num-noun = 1
predicate1.dcomp.noun1.num-verbal-present-participle = 1
predicate1.dcomp.noun1.val = here
predicate1.dcomp.noun1.verbal-present-participle1.val = sitting
predicate1.dcomp.num-noun = 1
predicate1.num-verb = 1
predicate1.verb1.auxiliary-verb1.val = have
predicate1.verb1.num-auxiliary-verb = 1
predicate1.verb1.num-prep-phrase = 1
predicate1.verb1.prep-phrase-list-type = space
predicate1.verb1.prep-phrase1.num-object = 1
predicate1.verb1.prep-phrase1.num-prep = 1
predicate1.verb1.prep-phrase1.object1.adjective1.val = an
predicate1.verb1.prep-phrase1.object1.num-adjective = 1
predicate1.verb1.prep-phrase1.object1.val = hour
predicate1.verb1.prep-phrase1.prep1.val = for
predicate1.verb1.val = been

Later, this parse tree will be the source for the bot to answer questions like:

Where have I been sitting?
Where have I been sitting for an hour?
Where was I for an hour?

As a test of its understanding of the statement.  That won’t be for awhile.

Next thing to teach CLUES : “Gerunds” !!

Then infinitives, then noun clauses.

~~~~~~~~~~~~~~~~~~~
Excellent, I have a great start on teaching CLUES about ‘gerund phrases’ and how they can play the role of the subject in a sentence.

Example:

“Giving the girls a holiday will please them”

And the output is….

pos = simple-sentence
predicate1.dcomp.noun1.val = them
predicate1.dcomp.num-noun = 1
predicate1.num-verb = 1
predicate1.verb1.auxiliary-verb1.val = will
predicate1.verb1.num-auxiliary-verb = 1
predicate1.verb1.val = please
subject.gerund-phrase1.dcomp.noun1.adjective1.val = a
subject.gerund-phrase1.dcomp.noun1.num-adjective = 1
subject.gerund-phrase1.dcomp.noun1.val = holiday
subject.gerund-phrase1.dcomp.num-noun = 1
subject.gerund-phrase1.icomp.noun1.adjective1.val = the
subject.gerund-phrase1.icomp.noun1.num-adjective = 1
subject.gerund-phrase1.icomp.noun1.val = girls
subject.gerund-phrase1.icomp.num-noun = 1
subject.gerund-phrase1.num-verb = 1
subject.gerund-phrase1.present-participle-predicate = true
subject.gerund-phrase1.verb1.val = giving
subject.num-gerund-phrase = 1

There is a LOT being said in this parse tree. 

It shows that the subject of the sentence is the entire string “giving the girls a holiday”.

That string is split up and we see that the direct compliment (dcomp), that is the “receiver” of the action of “giving” is “holiday” (that is WHAT we are giving).  WHO we are giving it to is the indirect compliment (icomp) which is “girls”.  We see “girls” modified by “the”.

We see that the subject is doing the action of “please”.  To who, the receiver of the action “please” is the direct compliment of the main sentence, dcomp which is “them”.

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #6 on: September 13, 2010, 01:24:22 pm »
Once all grammar rules are completed (in a couple of months), then on to concept specifications, then tieing in Q&A with knowledge base, for a completed product.

*

trotter

  • Roomba
  • *
  • 7
  • Beware - English is not my native language
    • chatterbots.fr
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #7 on: September 13, 2010, 11:30:44 pm »
That's really great. It can be very useful, not only for chatterbot. Like copy/past a book and sum it up or correct sentences. Or automatic translation ! This is promising.
What do you intend to do with your finished product ? Open source ? ;D

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #8 on: September 14, 2010, 01:06:44 pm »
Yes, really shaping up there.  I'm thinking we should add you to the Member's Projects page if you are interested.

*

DaveMorton

  • Trusty Member
  • ********
  • Replicant
  • *
  • 636
  • Safe, Reliable Insanity, Since 1961
    • Geek Cave Creations
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #9 on: September 14, 2010, 03:17:26 pm »
Oh, absolutely, Freddy! I agree! The only trouble is that, at Victor's current level of development on his CLUES engine, there's really not that much that can be put forth to the public. Beyond that, however, I think that what Victor is doing is CERTAINLY worthy of public recognition.
Comforting the Disturbed, Disturbing the Comfortable
Chat with Morti!
LinkedIn Profile
CAPTCHA4us

*

victorshulist

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 118
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #10 on: September 14, 2010, 06:21:03 pm »
Thanks everyone for those comments, I appreciate it.

Yes, I am starting to get excited about the prospects of this  'latest attempt' (of about 100 over the last 20 years !!).

Right now I have it understand abstract concepts such as:

"The train being late, the soldiers missed their boat"

and it actually understands the meaning of the word "missed"  does not mean the sadness of thinking of someone that is no longer with you, and also not missed as in fired at with a gun, but rather  'did not make it in time' for.  

It makes a correlation with the fact that the first sentence involved a method of transportation being 'late'.

Note also I could say

"The train, not being punctual, the soldiers missed their boat"

and it would make the same connection.

Dave - correct, I need a good month or two to complete grammar stuff.   After that, I can code the abstract concepts and then the 'correlation engine' which combines the concept of what was said to 'stored concepts' in its KB, and then, finally, the last peice (easiest) is the 'expresser engine' which will generate an output sentence based on the 'internal result' of the correlation.

Stay tuned everyone !  Every long weekend I have between now and the new year, including my christmas break, is spend on this!!!

Freddy - for the "Member's Projects" - does it include work in progress stuff, or only completed, in production bots that you can talk to online?   I'm still about 6 months away from my first conversation with the bot myself  (on the command line), let alone one that is online on the web for general public.

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #11 on: September 15, 2010, 12:53:39 pm »
Work in progress ?  Yes indeed !  I am never certain if this kind of thing is ever finished, but maybe leave it a while until you feel you have conquered enough of the challenge to feel more comfortable .  Whatever you choose the offer remains open to you :)

*

MarkB

  • Roomba
  • *
  • 17
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #12 on: September 15, 2010, 09:49:34 pm »
I think this is an interesting approach. So far all chat-bots I have seen have in common that they have little basic understanding about anything and only slightly more consideration about recent history of what has been said.

Instead most chat-bots do basic pattern-matching with little regard to context and general knowledge. If I say "The quick brown fox jumps over the lazy dog." and I next ask "what color is the fox" I want it to at least be able to answer such simple, basic question.

Instead the general approach seems to be to add so many patterns that some sort of reasonably sounding answer is given to any input. But this is the reason why most, if not all, conversations of chat-bots are completely incoherent.

Yet I think a basic mechanism to draw some meaning out of past sentences in order to meaningfully respond to simple questions will improve conversation considerably.

I have made quite a variety of bots performing different tasks. One thing that continually has to be addressed is how to reply to sentences referring to 'it' and its many varieties. It's possible and there are ways to address it in things like AIML and CHAT-L. But first of all it's rarely satisfactory. And it always adds considerable work to something that should be solved at a more fundamental level.

Unfortunately I haven't had time to work on this yet. But I'm often thinking about it and hopefully I'll have some time for it in the future. Most likely I'll be leveraging Link Grammar to pull out the structure of a sentence, but I still have to decide on a good internal representation that can support this kind of simple reasoning.

I'll be following your efforts with interest, as it looks to me you are way ahead of me in this regard. Best of luck and keep us posted.
"More human than human is our motto."

*

trotter

  • Roomba
  • *
  • 7
  • Beware - English is not my native language
    • chatterbots.fr
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #13 on: September 15, 2010, 11:18:34 pm »
Yeah, you're right, the "it" thing is a big issue. Bots are like old people with bad hearing, catching words and acting like they hear it all.

Quote
If I say "The quick brown fox jumps over the lazy dog." and I next ask "what color is the fox" I want it to at least be able to answer such simple, basic question.
If you try that with a human being, he may not anwser "brown" but "what an odd question" or something like that. ;D

Actually victorshulist, it's a really great and promising tool but I wonder if this approch is fast enough to be used in chatbots yet... Is it ? Another problem is that users often do grammatical errors.

Hope to see more soon anyway, it could be very useful.

*

MarkB

  • Roomba
  • *
  • 17
Re: Complex Language Understanding & Execution (CLUES) Engine
« Reply #14 on: September 16, 2010, 12:25:10 am »
If you try that with a human being, he may not anwser "brown" but "what an odd question" or something like that. ;D

Sure  ;)

Note though that I wrote it should be able to. Whether that's what it answers or not is a completely different matter. Likewise if someone says "go sit in that corner over there" it may not necessarily obey. But it would be nice if at least it understood.

I like your analogy to people with bad hearing.

Mark
"More human than human is our motto."

 


LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

432 Guests, 1 User

Most Online Today: 443. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles