Plain Text

  • 12 Replies
  • 8072 Views
*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • 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
  • *
  • 1729
    • mind-child
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.

*

infurl

  • Administrator
  • ***********
  • Eve
  • *
  • 1372
  • 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
  • *
  • 1307
  • 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
  • *
  • 1372
  • 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
  • *
  • 1307
  • 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
  • *
  • 1307
  • 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
  • *
  • 1307
  • 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
  • *
  • 1307
  • 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
  • *
  • 6860
  • 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
  • *
  • 633
    • AI / robot merchandise
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
  • *
  • 1307
  • 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
  • *
  • 1307
  • 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

 


Requirements for functional equivalence to conscious processing?
by DaltonG (General AI Discussion)
November 19, 2024, 11:56:05 am
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
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

428 Guests, 0 Users

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

Articles