Morti's "Next Step" in his Evolution

  • 7 Replies
  • 3468 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
  • *
  • 6855
  • 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
  • *
  • 6855
  • 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.

 


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
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

192 Guests, 0 Users

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

Articles