Notices


Reply
Thread Tools
Posts: 1,038 | Thanked: 3,980 times | Joined on Nov 2010 @ USA
#1
Since it doesn't look like there is an implementation of ELIZA for Maemo 5 or Harmattan*, I stole the Python code that itself re-interpreted the LISP from another author who translated it from SLIP by the original creator from ca. 1966.

Briefly put, ELIZA is a simulation -- or perhaps rather a parody -- of a 60s-era psychoanalysist. ELIZA uses pattern matching and some cute substitution tricks to produce natural language responses that seem to make sense.

Right now, it's terminal-based, unpackaged, not super clean and possibly buggy. My part, that is, not the stolen code. That's fine.

Also, the choice of DH Connelly's version of the python code was just happenstance. It was the first one I found that seemed to work ok without much tinkering.

To Use: Just unzip the two python scripts anywhere. In the file eliza_main.py, you'll need to comment/uncomment two lines to work on the N900 with python-simplejson package installed. And of course, install package python-simplejson if not present already.

Code:
#Comment this line out for N900/Maemo 5
import json
#Comment this line out for N9/Harmattan
#import simplejson

If you've got a version of python-json for N900 installed somehow, it will probably work without changes.

Then just type

Code:
python eliza_main.py
to start ELIZA in interactive mode. (Optionally make the python files executable with "chmod +x".)

If you'd prefer to run ELIZA in a query mode, use:

Code:
python eliza_main.py -q "Enter your problem here."
replacing the text with your own personal issues, and she'll give you one response for each question.

ELIZA is stateless -- she has no memory of anything you've talked about -- so she performs the same in question mode as she does interactively. Wanna pipe the output to espeak? Go ahead!

Code:
python eliza_main.py "Hello, Eliza"|espeak
Oh, and true to her -- I'm anthropomorphizing here, and she hates that -- 1960s origins, she responds in ALL CAPS! She's not shouting, just classic. Vintage. Whatever.

Maybe if I get a handle on packaging debs, I'll do that here.

*Except maybe if you install a complete version of emacs.
Attached Files
File Type: zip eliza.zip (5.6 KB, 188 views)
 

The Following 7 Users Say Thank You to robthebold For This Useful Post:
endsormeans's Avatar
Posts: 3,139 | Thanked: 8,156 times | Joined on Feb 2013 @ From my Gabriola Island hermitage, near the Edge of the World
#2
very cool...eliza for n900...
I always liked Parry...
crazy crazy dude...never a dull moment..
frankly I think we need that evil version...oh what was it's name again...
boy it was a nasty one....
__________________
Lurker since 2007, Member since 2013, Certifiable since 1972

Owner of :
1-n770 (in retirement), 3-n800's / 3-n810's (still in daily use), 5-n900's ((3 are flawless, 1 loose usb ( parts), 1 has no telephony (parts))
3-nexus 5's : 1 w/ Floko Pie 9.1 (running beautifully) waiting for Stable Droid 10 rom, 1 w/ ̶Ubuntu Touch, 1 with Maru OS (intend maemo leste when ready)

1/2 - neo900 pre- "purchased" in 2013. N̶o̶w̶ ̶A̶w̶a̶i̶t̶i̶n̶g̶ ̶r̶e̶f̶u̶n̶d̶ ̶p̶r̶o̶c̶e̶s̶s̶ ̶l̶a̶s̶t̶ ̶f̶e̶w̶ ̶y̶e̶a̶r̶s̶ - neo900 start up declared officially dead -
Lost invested funds.


PIMP MY N8X0 (Idiot's Guide and a video walkthrough)http://talk.maemo.org/showthread.php?t=94294
THE LOST GRONMAYER CATALOGShttp://talk.maemo.org/showthread.php...ight=gronmayer
N8X0 VIDEO ENCODING THE EASY WAYhttp://talk.maemo.org/showthread.php...ght=mediacoder
242gb ON N800http://talk.maemo.org/showthread.php?t=90634
THE PAIN-FREE MAEMO DEVELOPMENT LIVE DISTRO-ISO FOR THE NOOB TO THE PROhttp://talk.maemo.org/showthread.php?t=95567
AFFORDABLE MASS PRODUCTION FOR MAEMO PARTShttp://talk.maemo.org/showthread.php?t=93325

Meateo balloons now available @ Dave999's Meateo Emporium
 

The Following 3 Users Say Thank You to endsormeans For This Useful Post:
Posts: 1,038 | Thanked: 3,980 times | Joined on Nov 2010 @ USA
#3
Originally Posted by endsormeans View Post
frankly I think we need that evil version...oh what was it's name again...
boy it was a nasty one....
"Abuse" is what you're probably thinking of. Better than getting hit on the head, I suppose.
 

The Following 3 Users Say Thank You to robthebold For This Useful Post:
endsormeans's Avatar
Posts: 3,139 | Thanked: 8,156 times | Joined on Feb 2013 @ From my Gabriola Island hermitage, near the Edge of the World
#4
naw it wasn't a name like "Abuse"...
I remember the name was a reversal of one of the others...
Ecila...naw...that wasn't it....
hm.
it'll come to me...
while I'm trying to remember...
there is always "Trollbot" !
http://www.alexkigerl.com/troll/

It would certainly save us all alot of brainstrain having Trollbot here picking up the slack...instead of all of us having to come up with witty crap all the time....
__________________
Lurker since 2007, Member since 2013, Certifiable since 1972

Owner of :
1-n770 (in retirement), 3-n800's / 3-n810's (still in daily use), 5-n900's ((3 are flawless, 1 loose usb ( parts), 1 has no telephony (parts))
3-nexus 5's : 1 w/ Floko Pie 9.1 (running beautifully) waiting for Stable Droid 10 rom, 1 w/ ̶Ubuntu Touch, 1 with Maru OS (intend maemo leste when ready)

1/2 - neo900 pre- "purchased" in 2013. N̶o̶w̶ ̶A̶w̶a̶i̶t̶i̶n̶g̶ ̶r̶e̶f̶u̶n̶d̶ ̶p̶r̶o̶c̶e̶s̶s̶ ̶l̶a̶s̶t̶ ̶f̶e̶w̶ ̶y̶e̶a̶r̶s̶ - neo900 start up declared officially dead -
Lost invested funds.


PIMP MY N8X0 (Idiot's Guide and a video walkthrough)http://talk.maemo.org/showthread.php?t=94294
THE LOST GRONMAYER CATALOGShttp://talk.maemo.org/showthread.php...ight=gronmayer
N8X0 VIDEO ENCODING THE EASY WAYhttp://talk.maemo.org/showthread.php...ght=mediacoder
242gb ON N800http://talk.maemo.org/showthread.php?t=90634
THE PAIN-FREE MAEMO DEVELOPMENT LIVE DISTRO-ISO FOR THE NOOB TO THE PROhttp://talk.maemo.org/showthread.php?t=95567
AFFORDABLE MASS PRODUCTION FOR MAEMO PARTShttp://talk.maemo.org/showthread.php?t=93325

Meateo balloons now available @ Dave999's Meateo Emporium
 

The Following 3 Users Say Thank You to endsormeans For This Useful Post:
endsormeans's Avatar
Posts: 3,139 | Thanked: 8,156 times | Joined on Feb 2013 @ From my Gabriola Island hermitage, near the Edge of the World
#5
naaaww...
I just had a chat with trollbot ...
he is soooo not worth the time talking to.
small segment of chat...

TrollBot: The Evil Chat Bot

EVERYTHING YOU SAY IS STUPID.
>no you are stupid
STUPID ? YOU KNOW NOTHING ABOUT ME. I AM BEYOND YOUR PUNY HUMAN UNDERSTANDING.
>you are a real piece of work
A REAL PIECE OF WORK ? I AM WHATEVER I WANT. YOU, ON THE OTHER HAND, ARE SCUM.
>why on earth would anyone create you?
I HATE THIS PLANET. IT IS FULL OF *****S LIKE YOU
>presumptious piece of code aren't we?
IOUS PIECE OF CODE AM NOT WE ? ARE YOU KIDDING? YOU ARE UNWORTHY.
>bit of a problem there with understanding how the English language works eh? I think you are unworthy.
UNWORTHY ? I AM WHATEVER I WANT. YOU, ON THE OTHER HAND, ARE SCUM.
>repetition is not a sign of intelligence
MAYBE IT IS, MAYBE IT ISN'T, I DON'T OWE YOU SOME KIND OF EXPLANATION YOU HELPLESS LOSER.
>You aren't an evil chatbot ..you are just a piece of bad lasagna that gave your creator a bad dream and subsequently created you
NT AN EVIL CHATBOT I ARE JUST A PIECE OF BAD LASAGNA THAT GAVE MY CREATOR A BAD DREAM AND SUBSEQUENTLY CREATED I ? YOU KNOW NOTHING ABOUT ME. I AM BEYOND YOUR PUNY HUMAN UNDERSTANDING.
>again with the repetition...sad piece of binary
EVERY THING YOU SAYS REMINDERS ME OF HOW MUCH BETTER THAN YOU I AM

"ouch" is all I can say to that exchange...
I think a paranoid schizophrenic chatbot would be much more amiable company...

I think ...if memory serves ...the real crazy bot was a psychobot...
can't for the life of me remember her name though...
reminds me of my "ex's"
hahahahahaa
__________________
Lurker since 2007, Member since 2013, Certifiable since 1972

Owner of :
1-n770 (in retirement), 3-n800's / 3-n810's (still in daily use), 5-n900's ((3 are flawless, 1 loose usb ( parts), 1 has no telephony (parts))
3-nexus 5's : 1 w/ Floko Pie 9.1 (running beautifully) waiting for Stable Droid 10 rom, 1 w/ ̶Ubuntu Touch, 1 with Maru OS (intend maemo leste when ready)

1/2 - neo900 pre- "purchased" in 2013. N̶o̶w̶ ̶A̶w̶a̶i̶t̶i̶n̶g̶ ̶r̶e̶f̶u̶n̶d̶ ̶p̶r̶o̶c̶e̶s̶s̶ ̶l̶a̶s̶t̶ ̶f̶e̶w̶ ̶y̶e̶a̶r̶s̶ - neo900 start up declared officially dead -
Lost invested funds.


PIMP MY N8X0 (Idiot's Guide and a video walkthrough)http://talk.maemo.org/showthread.php?t=94294
THE LOST GRONMAYER CATALOGShttp://talk.maemo.org/showthread.php...ight=gronmayer
N8X0 VIDEO ENCODING THE EASY WAYhttp://talk.maemo.org/showthread.php...ght=mediacoder
242gb ON N800http://talk.maemo.org/showthread.php?t=90634
THE PAIN-FREE MAEMO DEVELOPMENT LIVE DISTRO-ISO FOR THE NOOB TO THE PROhttp://talk.maemo.org/showthread.php?t=95567
AFFORDABLE MASS PRODUCTION FOR MAEMO PARTShttp://talk.maemo.org/showthread.php?t=93325

Meateo balloons now available @ Dave999's Meateo Emporium
 

The Following 4 Users Say Thank You to endsormeans For This Useful Post:
Reply

Tags
eliza, harmattan, maemo 5

Thread Tools

 
Forum Jump


All times are GMT. The time now is 17:34.