From my719@nyu.edu  Mon Nov  2 16:19:30 2009
Received: from mx2.cims.nyu.edu (mx2.cims.nyu.edu [128.122.81.61])
	by mail.cims.nyu.edu (8.13.8+Sun/8.13.8) with ESMTP id nA2LJUmw025259
	for <shasha@mail.cims.nyu.edu>; Mon, 2 Nov 2009 16:19:30 -0500 (EST)
Received: from mx1.nyu.edu (MX1.NYU.EDU [128.122.118.241])
	by mx2.cims.nyu.edu (8.13.8+Sun/8.13.8) with ESMTP id nA2LJRVr019958
	for <shasha@courant.nyu.edu>; Mon, 2 Nov 2009 16:19:27 -0500 (EST)
Received: from mx1.nyu.edu (localhost [127.0.0.1])
	by mx1.nyu.edu (8.13.8/8.13.8) with ESMTP id nA2LJMJh027781
	for <shasha@courant.nyu.edu>; Mon, 2 Nov 2009 16:19:22 -0500 (EST)
Received: from [172.26.26.247] (172-26-26-247.DYNAPOOL.NYU.EDU [172.26.26.247])
	(authenticated bits=0)
	by mx1.nyu.edu (8.13.8/8.13.8) with ESMTP id nA2LJIWS027744
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Mon, 2 Nov 2009 16:19:21 -0500 (EST)
Message-ID: <4AEF4CCA.3020308@nyu.edu>
Date: Mon, 02 Nov 2009 16:19:06 -0500
From: Michael Yuen <my719@nyu.edu>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: shasha@courant.nyu.edu, shasha@cs.nyu.edu
Subject: eliza program
Content-Type: multipart/mixed;
 boundary="------------010708060908050900010602"
X-Scanned-By: MIMEDefang 2.58 on 128.122.81.61
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (mx2.cims.nyu.edu [128.122.81.61]); Mon, 02 Nov 2009 16:19:30 -0500 (EST)
Status: RO
Content-Length: 6261

This is a multi-part message in MIME format.
--------------010708060908050900010602
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit



--------------010708060908050900010602
Content-Type: text/plain;
 name="michaelyeliza.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="michaelyeliza.py"

#!/usr/bin/env python
# Michael Yuen
# Eliza Program
#
import random
print "Hello, If you would like to stop type 'I quit'"
angry = ["anger","angry","frustrated","furious","mad","upset",\
         "frustrating","bad","unhappy","fuming","rage","outrage",\
         "infuriate","infuriating","not happy","not joyful",\
         "not joyous","not wonderful","not cheerful","not ecstatic",\
         "not great","not so good","not good", "not outstanding",\
         "not amazing","not fantastic","terrible","awful","hate",\
         "not fun","hate everyone"]
happy = ["happy","joyful","joyous","cheerful","ecstatic","wonderful",\
         "great","awesome","amazing","outstanding","fantastic",\
         "not sad","not mad","not angry","not upset","not frustrated",\
         "not furious","not bad","not unhappy","not fuming","decent"\
         "not infuriating","good","nothing wrong","fun","fine"]
family = ["mother","mom","father","dad","sister","brother","cousin",\
          "aunt","uncle","grandma","grandmother","grandpa","grandfather"]
sad = ["sad","depressed","depressing","disappointed","disappoint","cry",\
       "crying","tears","lonely","alone","isolated","desolate"\
       "no friends","no one likes me","no one talks to me",\
       "no one loves me","everyone hates me","wrong","hopeless","helpless"]
relationship = ["love him","love her","like her a lot","boyfriend",\
                 "girlfriend","he loves me","she loves me","i love them"\
                 "like him a lot","kiss","hug","relationship",\
                 "relationships"]
feelings = ["tired","lazy","sick","bored","sleepy","sleeping","irritible",\
            "stupid"]
bad = ["drugs","taking drugs","doing drugs","kill him","kill her"\
              "killing everyone","killing them","kill them","suicide"\
              "ending my life","end my life"]
no = ["no","never","nothing","zilch","nada","none"]
yes = ["of course","absolutely","definitely","for sure","yes"]
questions = ["i dont know","idk","how should i know","what else","unsure",\
             "what about","how about","why do you",]
phrase = ["why are you feeling ", "how come you are feeling ",\
          "Is there a reason why you are feeling ", "why ", "how come "]
phrase1 = ["It is great you are feeling ","Why are you feeling ",\
           "What caused you to feel ","That's good that you are ",\
           "Continue to feel ","What else makes you feel ",\
           "You should try to make others feel ", "Share your feeling of ",\
           "Do others feel ","Do what makes you feel "]
phrase2 = ["Tell me more about ","How is your ","What about your ",\
           "Is everything okay with ","Do you think of ","Do you like your ",\
           "Do you miss your ","Do you have a good relationship with your ",\
           "What happened to your ","What's going on with your ",
           "Is there something you want to tell me about your "]
phrase3 = ["Why are you feeling ","Is there a way to not feel so ",\
           "You shouldn't feel ","Cheer up, don't feel ",\
           "What made you feel ","What caused you to feel ",\
           "Why did that make you feel ","Don't feel ","Be optimist and not ",\
           "Talk to me about so you don't feel so ",\
           "You shouldn't feel like "]
phrase4 = ["It is great that you feel this way ","What about this person? "\
           "That's really good, tell me more ","What else? "\
           "Tell me about the relationship ","Is the relatnioship strong? ",\
           "Do you feel close with this person ?","What else can you say? ",\
           "Where do you see the relationship going? "]
phrase5 = ["Why do you feel ","How come you are feeling ",\
           "What made you feel ","What caused you to feel ",\
           "Can you change how you feel ","Tell me more about being ",\
           "What else can you say about being ","Are you sure you are "]
phrase6 = ["Don't do that!","Stop thinking that!","That's terrible",\
          "Why do you feel like doing that?","Think happy thoughts",\
          "Do you think your parents would approve?","Is that really smart?",\
          "Should you be doing that?","Is that right?","Tell me more about it",\
          "How come you feel like doing that?","What caused this?"]
phrase7 = ["Why not?","How come?","Why?","Really?","You sure?","Positive?",\
           "Okay, what else?","If that's what you want"]
phrase8 = ["Okay ","Good ","Alright ","So it's settled ","So what now? ",\
           "Anything else you want to say? ","Great ","Good to hear ",\
           "You sure? ","Okay good. "]
phrase9 = ["Don't ask me","Think about it","What do you think?","Come on. ",\
           "Anything else?","We are talking about you.","Tell me about it ",\
           "You sure? ","Say something ","Anything ","What's wrong? ",\
           "Figure something out. ","You can do it "]           
resp = "What else? "
ans = raw_input("So how are you? ")
while ans != "i quit":
    ans1 = ans.split()
    for x in ans1:
        x = x.lower()
        if x in angry:
            resp = random.choice(phrase) + x +" "
        elif x in happy:
            resp = random.choice(phrase1) + x +" "
        elif x in family:
            resp = random.choice(phrase2) + x +" "
        elif x in sad:
            resp = random.choice(phrase3) + x +" "
        elif x in relationship:
            resp = random.choice(phrase4)
        elif x in feelings:
            resp = random.choice(phrase5) + x +" "
        elif x in bad:
            resp = random.choice(phrase6)
        elif x in no:
            resp = random.choice(phrase7)
        elif x in yes:
            resp = random.choice(phrase8)
        elif x in questions:
            resp = random.choice(phrase9)
    ans = raw_input(resp)
    resp = "What else? "
if ans == "i quit":
    print "Okay good bye"
    print "See you next time"

--------------010708060908050900010602--

