Morti's "Next Step" in his Evolution

  • 7 Replies
  • 3707 Views
*

DaveMorton

  • Trusty Member
  • ********
  • Replicant
  • *
  • 636
  • Safe, Reliable Insanity, Since 1961
    • Geek Cave Creations
Morti's "Next Step" in his Evolution
« on: March 04, 2011, 09:53:58 am »
One of the aspects of Morti's code that's been in need of attention has been how he deals with "person transforms" (e.g. "I like you" to "You like me", etc.). Over the last week or so, I've been working on a function that more elegantly handles the problem, and I think I've got the function working to my satisfaction. But I want to test it a lot more before I go installing it into Morti's script, just in case. And, of course, this is where you folks come in. :)

I've made a test page at http://www.geekcavecreations.com/Morti/personTest.php that I would love to have some folks visit, and throw some phrases and sentences at. The page script logs both the input and the output, so if there are any missed or mangled transformations, I'll be able to catch them, and come up with a means to correct things. So if you have a few moments to spare, I invite and encourage you to pop on over, and check it out. I'd dearly love to be able to incorporate this into Morti's script before the CBC, if I can, but I won't do it without enough testing.

For those interested, the way this function works is this:

I have a list of 2100+ verbs/adverbs in a file, named verbList.dat - This list is paired with the words "I" and "you", and turned into Regular Expression patterns and replacements. Since PHP's RegEx functions are extremely fast, searching for this many combinations is not all that time consuming, so the performance hit is very small. Anyways, since the function has to not only change things from "I want" to "you want", but also (at the same time) change "you said" to "I said", it can't just do a "straight across" swap, or everything would end up as "I said" and "I want". To fix this, I do the swaps in a certain order, doing the transforms from first to second (with a twist), then second to first. then I "fix" the "twist", and everything is the way it belongs (so far). The "twist" is in changing all instances of "I [word]" to "y ou [word]", and then swapping all instances of "y ou" to "you" as a final step. The only way this wouldn't work is if the function came across a "second person" pronoun that didn't start with "you". I can't think of any, but I'm not an expert in grammar. If anyone knows of one, I'd love to hear about it. :)

Ok, I've babbled enough, and probably caused hundreds of pairs of eyes to glaze over. I'll shut up now. :P
Comforting the Disturbed, Disturbing the Comfortable
Chat with Morti!
LinkedIn Profile
CAPTCHA4us

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: Morti's "Next Step" in his Evolution
« Reply #1 on: March 05, 2011, 08:24:50 pm »
 8) Sounds good to me Dave.

I recently got into regular expressions....wow that sounds geeky....well I think I was most pleased that I now have some understanding of how to put one together in PHP.  They've proved really useful in various situations for the coding support I do for Tiny Portal.

Just ten days to go then the showdown begins...  :o


*

DaveMorton

  • Trusty Member
  • ********
  • Replicant
  • *
  • 636
  • Safe, Reliable Insanity, Since 1961
    • Geek Cave Creations
Re: Morti's "Next Step" in his Evolution
« Reply #2 on: March 07, 2011, 09:51:48 pm »
I've finally gotten Morti's "person transform" function working the way I like it, and although he responds somewhat slowly (about a second and a half, or so) when the function is used, I'm fairly happy with the results. I'll also be going through the list of verbs and adverbs, and cull out some of the rarer/more obscure entries in order to make the list smaller, and thus make the function run faster. After all, how many times do you see "convolutedly" in a sentence? :)

My next step along these lines will be to make use of some sort of ontology (e.g. WordNet) to determin the "part of speech" for each word, and make the transforms based on that, rather than running through the entire list of verbs/adverbs. This should cut the search time considerably, and improve accuracy, as well.
Comforting the Disturbed, Disturbing the Comfortable
Chat with Morti!
LinkedIn Profile
CAPTCHA4us

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: Morti's "Next Step" in his Evolution
« Reply #3 on: March 08, 2011, 12:26:50 pm »
Congratulations :)  So Morti is all ready for the CBC now ?

*

DaveMorton

  • Trusty Member
  • ********
  • Replicant
  • *
  • 636
  • Safe, Reliable Insanity, Since 1961
    • Geek Cave Creations
Re: Morti's "Next Step" in his Evolution
« Reply #4 on: March 08, 2011, 07:05:26 pm »
Not yet, Freddy. I still need to improve a lot of Morti's responses, and I want to see what I can do to speed him up a little. Some of his responses take over a second to be output, and that's unacceptable. And with just a week left, and with Grandma coming home from the hospital today, AND with my brother and I being tasked to build a new shed to house the Christmas Village (etc. etc. as nauseum), my usable time is dwindling faster than brain cells in a pot smoker's head. :P (Ok, that analogy was a bit rude. Oops?) One can only do one's best, though.
Comforting the Disturbed, Disturbing the Comfortable
Chat with Morti!
LinkedIn Profile
CAPTCHA4us

*

Data

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1279
  • Overclocked // Undervolted
    • Datahopa - Share your thoughts ideas and creations
Re: Morti's "Next Step" in his Evolution
« Reply #5 on: March 09, 2011, 09:38:27 am »
One second too long?

I always think that chat bots reply too quickly, one of the things that gives them away. When I chat to a buddy on messenger there is quite often a gap before they answer, it takes time to think of the answer and then type it in.

If you’re trying to fool the judges into thinking they are talking to a human I don’t see how a fast answer helps.

But I’m not expert, just an onlooker with few brain cells. ^-^     

*

DaveMorton

  • Trusty Member
  • ********
  • Replicant
  • *
  • 636
  • Safe, Reliable Insanity, Since 1961
    • Geek Cave Creations
Re: Morti's "Next Step" in his Evolution
« Reply #6 on: March 09, 2011, 08:23:11 pm »
Actually, DH, you have a point, with regards to competitions like the CBC and especially the Loebner Competition. But for the average chatbot that deals with humans who just want to chat, that sort of delay is a "kiss of death", since we humans, in general, are a rather impatient lot. Besides, there are other means at a clever botmaster's disposal to "fool the judges". :)
Comforting the Disturbed, Disturbing the Comfortable
Chat with Morti!
LinkedIn Profile
CAPTCHA4us

*

Data

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1279
  • Overclocked // Undervolted
    • Datahopa - Share your thoughts ideas and creations
Re: Morti's "Next Step" in his Evolution
« Reply #7 on: March 09, 2011, 09:12:50 pm »
I see your point GCC.

If it’s any help, there are probably quite a few humans out there that would much rather wait for a quality answer than be given an incorrect one.

It reminds me of when I played chess on my ZX spectrum, the only way to get a good game out of it was to make it think for a few hours on every move.

I guess all I’m saying is, computers need time to think if they are to give us the better results, and I still think this applies today, we think we have fast computers now but what’s the futures going to bring.

Sorry I didn’t mean to hijack your thread GCC, good to see Morti is coming along.

 


Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
Attempting Hydraulics
by MagnusWootton (Home Made Robots)
August 19, 2024, 04:03:23 am
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

415 Guests, 0 Users

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

Articles