Plain Text

  • 12 Replies
  • 4452 Views
*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1265
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Plain Text
« on: March 19, 2018, 11:09:16 pm »
On this original thread:  http://aidreams.co.uk/forum/index.php?topic=12940

Our discussion was about "simple things rarely stay simple"

That discussion inspired me to focus on making an easier chatbot, which implements plain text for creating natural language software agents.

Demo Page:

http://chatbot.ml/easier

Plain Text Source Code:

http://chatbot.ml/easier/source.php

NOTE: The original A.I. JSON project continues.  I just thought a plain text version deserves a new thread of its own.

« Edit Notes: Fixed broken links from domain name aihax.com to new domain chatbot.ml
« Last Edit: November 16, 2018, 04:15:56 am by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1591
    • contrast-zone
Re: Plain Text
« Reply #1 on: March 19, 2018, 11:20:10 pm »
Nice, I like things simple.

It is interesting how much we can simplify things by narrowing a domain range we want to deal with. That is why I think domain specific languages will never be beaten up by general purpose languages.
There exist some rules interwoven within this world. As much as it is a blessing, so much it is a curse.

*

infurl

  • Administrator
  • ***********
  • Eve
  • *
  • 1266
  • Humans will disappoint you.
    • Home Page
Re: Plain Text
« Reply #2 on: March 19, 2018, 11:30:43 pm »
Quote from: Albert Einstein
“Everything should be as simple as it can be, but not simpler.”

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1265
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Plain Text
« Reply #3 on: March 22, 2018, 11:25:35 pm »
I put it up on a GitHub repository:

https://github.com/chatbots/chatbot
My Very Enormous Monster Just Stopped Using Nine

*

infurl

  • Administrator
  • ***********
  • Eve
  • *
  • 1266
  • Humans will disappoint you.
    • Home Page
Re: Plain Text
« Reply #4 on: March 22, 2018, 11:40:22 pm »
Very nice and elegant.

You number the patterns from $2 so I assume that $1 would be the whole sentence, like \0 in a regular expression substitution?

Code
In = I.replace(/'d\b/gi, " would");
In = I.replace(/'s\b/gi, " is");

You need to expand these two rules a bit as they are not nearly specific enough.

Apostrophe-S could denote genitive case far more often than it is a contraction of "where is" or "what is" or "<pronoun> is" etc wouldn't it? The number of cases where it is a contraction are small enough to enumerate. Likewise, apostrophe-D could equally be had or would but that's a bit more complicated to disambiguate.

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1265
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Plain Text
« Reply #5 on: March 24, 2018, 03:07:50 am »
Very nice and elegant.

More so, I think, thanks to you.

You number the patterns from $2 so I assume that $1 would be the whole sentence, like \0 in a regular expression substitution?

I was capturing the whole pattern, but there was really no need to, so I stopped capturing that.  The patterns are now numbered from $1.


You need to expand these two rules a bit as they are not nearly specific enough.

These rules were not being reached in the plain text, so they were removed for now.

Apostrophe-S could denote genitive case far more often than it is a contraction of "where is" or "what is" or "<pronoun> is" etc wouldn't it? The number of cases where it is a contraction are small enough to enumerate. Likewise, apostrophe-D could equally be had or would but that's a bit more complicated to disambiguate.


The number of cases equals two.  Only "DO NOT" and "CAN NOT" are reached in the plain text.  So by handling these two cases, the genitive cases are no longer being treated as contractions, which is an improvement.

Thanks for your excellent suggestions, infurl.

 
Code
            °º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,          ¸
« Last Edit: March 25, 2018, 05:08:52 pm by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1265
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Plain Text
« Reply #6 on: April 02, 2018, 11:55:13 pm »
Thanks for the like infurl

Many thanks to:  therealjackson

who forked therealjackson/chatbot-1 from  chatbots/chatbot

on github.com
My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1265
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Plain Text
« Reply #7 on: April 03, 2018, 09:07:27 pm »
Thank you Ivan for becoming a "Watcher" on GitHub.

My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1265
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Plain Text
« Reply #8 on: April 03, 2018, 09:33:17 pm »
With 8 Followers on GitHub so far, "Plain Text" may yet grow into an AIDreams forum of its own some day, rather than  piggy backing off of the AIML forum, which was a bit unused lately.  Hopefully Dr. Wallace does not mind lending a thread to a new, small A.I. system.  Understandably, it takes time to become as well known as the big A.I. systems like  AIML, RiveScript, ChatScript, ElfScript.  If that is even possible any more, with the loss of Hugh.  Assuming it is ( and I hope it is)  The big A.I. systems all started out the same way "Plain Text" is starting out right now.





My Very Enormous Monster Just Stopped Using Nine

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6832
  • Mostly Harmless
Re: Plain Text
« Reply #9 on: April 03, 2018, 10:27:14 pm »
Hehe, well I wouldn't call my ElfScript one of the big ones or even well known, but I did like seeing it mentioned in the same sentence as those that are  :)

I hope the Loebner Prize can keep going without it's main character and driving force.

*

Don Patrick

  • Trusty Member
  • ********
  • Replicant
  • *
  • 614
    • Artificial Detective
Re: Plain Text
« Reply #10 on: April 11, 2018, 10:27:00 am »
I don't have a lot to add since the code is already very concise. One thing I'd advise is to change the ".*" regexp into ".*?" for later patterns where something might follow the wildcard:
https://blog.mariusschulz.com/2014/06/03/why-using-in-regular-expressions-is-almost-never-what-you-actually-want

If you want less lines of code, which in my opinion doesn't matter, you may be interested to know that you can do "x = x.replace().replace();" without having to assign "x = " twice. For the sake of code clarity I don't advise it, however.

Lastly, converting all " 's " to "is" will not be accurate because it can have multiple meanings.
let's = let us
's + got = has
what/who/how/etc + 's = is/has
he/that/it + 's = is/has
noun + 's = is/has/possessive
I'd consider not converting " 's " to "is" by default but to substitute "is" in the patterns with "(is|'s)" automatically using replace(), and "has" with "(has|'s)".
(Note: I initially posted this in the original thread, so I'd overlooked Infurl's similar comment here)
« Last Edit: April 11, 2018, 10:57:36 am by Don Patrick »
CO2 retains heat. More CO2 in the air = hotter climate.

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1265
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Plain Text
« Reply #11 on: April 11, 2018, 11:14:47 pm »
Thank you, so much Don.

Let me start by responding over on the other thread to what you posted there.

And, then I will return here, to respond to what you posted on this thread.
My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1265
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Plain Text
« Reply #12 on: November 16, 2018, 04:23:01 am »
Don Patrick, who commented and helped here, is worth a mention: http://artistdetective.com/arckon   
Currently scheduled to be online Mondays,  Don's A.I. approach seems unique from other popular A.I. approaches.
It deserves a new thread of it's own.  So this post is a reminder and reference.

My Very Enormous Monster Just Stopped Using Nine

 


What's everyone up to ?
by ivan.moony (General Chat)
Today at 08:45:30 am
I want one!
by frankinstien (General Chat)
December 03, 2021, 06:57:48 pm
Pattern based NLP
by MikeB (General Project Discussion)
December 03, 2021, 11:19:32 am
New cryopreservation method is much better
by LOCKSUIT (General Chat)
December 02, 2021, 11:42:58 am
Artificial God?
by MagnusWootton (General AI Discussion)
December 01, 2021, 07:02:41 pm
Project Acuitas
by WriterOfMinds (General Project Discussion)
November 29, 2021, 05:31:57 am
java/kotlin to python
by yotamarker (AI Programming)
November 28, 2021, 07:23:54 pm
Dendrite Processing
by MagnusWootton (General Chat)
November 28, 2021, 03:01:28 pm
Ameca The Future Face Of Robotics
by infurl (Robotics News)
Today at 04:16:45 am
Real Self Replicating robots.
by MagnusWootton (AI News )
December 02, 2021, 08:07:37 pm
I wonder how well GPT-3 will on run this.
by MagnusWootton (AI News )
December 01, 2021, 06:41:34 pm
ai websight that explains computer code
by frankinstien (AI News )
November 09, 2021, 01:05:20 am
$50,000.00!!!!!
by Don Patrick (AI News )
October 28, 2021, 04:29:41 pm

Users Online

40 Guests, 1 User
Users active in past 15 minutes:
ivan.moony
[Trusty Member]

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

Articles