maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [M5+M6] Eliza for N9 and N900 (https://talk.maemo.org/showthread.php?t=96349)

robthebold 2016-01-13 03:42

Eliza for N9 and N900
 
1 Attachment(s)
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.

endsormeans 2016-01-13 04:03

Re: Eliza for N9 and N900
 
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....

robthebold 2016-01-13 04:09

Re: Eliza for N9 and N900
 
Quote:

Originally Posted by endsormeans (Post 1494679)
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. ;)

endsormeans 2016-01-13 05:15

Re: Eliza for N9 and N900
 
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/
:D
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....

endsormeans 2016-01-13 05:23

Re: Eliza for N9 and N900
 
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


All times are GMT. The time now is 23:32.

vBulletin® Version 3.8.8