
3Ic        0   @   s  d  d k  Td d f d d f d
 d f d d f d d f d d f d d f d! d f d% d f d) d f d. d f d1 d f d5 d f d9 d f d= d f d@ d f dE d f dJ d f dM d f dQ d f dU d f dZ d f d] d f da d f df d f dj d f dn d f dr d f dv d f dz d f d} d f d d f d d f d d f d d f d d f d d f f% Z e e e  Z d   Z d   Z e d j o e   n d S(   i(   t   *s   I need (.*)s   Why do you need %1?s#   Would it really help you to get %1?s   Are you sure you need %1?s   Why don\'t you (.*)s   Do you really think I don't %1?s   Perhaps eventually I will %1.s   Do you really want me to %1?s   Why can\'t I (.*)s&   Do you think you should be able to %1?s#   If you could %1, what would you do?s!   I don't know -- why can't you %1?s   Have you really tried?s   I can\'t (.*)s   How do you know you can't %1?s"   Perhaps you could %1 if you tried.s!   What would it take for you to %1?s	   I am (.*)s&   Did you come to me because you are %1?s   How long have you been %1?s   How do you feel about being %1?s	   I\'m (.*)s    How does being %1 make you feel?s   Do you enjoy being %1?s   Why do you tell me you're %1?s   Why do you think you're %1?s   Are you (.*)s#   Why does it matter whether I am %1?s%   Would you prefer it if I were not %1?s   Perhaps you believe I am %1.s!   I may be %1 -- what do you think?s	   What (.*)s   Why do you ask?s%   How would an answer to that help you?s   What do you think?s   How (.*)s   How do you suppose?s)   Perhaps you can answer your own question.s    What is it you're really asking?s   Because (.*)s   Is that the real reason?s    What other reasons come to mind?s(   Does that reason apply to anything else?s   If %1, what else must be true?s   (.*) sorry (.*)s/   There are many times when no apology is needed.s-   What feelings do you have when you apologize?s	   Hello(.*)s*   Hello... I'm glad you could drop by today.s   Hi there... how are you today?s!   Hello, how are you feeling today?s   I think (.*)s   Do you doubt %1?s   Do you really think so?s   But you're not sure %1?s   (.*) friend (.*)s    Tell me more about your friends.s/   When you think of a friend, what comes to mind?s/   Why don't you tell me about a childhood friend?t   Yess   You seem quite sure.s    OK, but can you elaborate a bit?s   (.*) computer(.*)s    Are you really talking about me?s+   Does it seem strange to talk to a computer?s   How do computers make you feel?s$   Do you feel threatened by computers?s
   Is it (.*)s   Do you think it is %1?s%   Perhaps it's %1 -- what do you think?s!   If it were %1, what would you do?s   It could well be that %1.s
   It is (.*)s   You seem very certain.s=   If I told you that it probably isn't %1, what would you feel?s   Can you (.*)s    What makes you think I can't %1?s   If I could %1, then what?s   Why do you ask if I can %1?s
   Can I (.*)s   Perhaps you don't want to %1.s   Do you want to be able to %1?s   If you could %1, would you?s   You are (.*)s   Why do you think I am %1?s(   Does it please you to think that I'm %1?s#   Perhaps you would like me to be %1.s-   Perhaps you're really talking about yourself?s   You\'re (.*)s   Why do you say I am %1?s    Are we talking about you, or me?s   I don\'t (.*)s   Don't you really %1?s   Why don't you %1?s   Do you want to %1?s   I feel (.*)s(   Good, tell me more about these feelings.s   Do you often feel %1?s   When do you usually feel %1?s!   When you feel %1, what do you do?s   I have (.*)s"   Why do you tell me that you've %1?s   Have you really %1?s,   Now that you have %1, what will you do next?s   I would (.*)s#   Could you explain why you would %1?s   Why would you %1?s!   Who else knows that you would %1?s   Is there (.*)s   Do you think there is %1?s   It's likely that there is %1.s   Would you like there to be %1?s   My (.*)s   I see, your %1.s   Why do you say that your %1?s   When your %1, how do you feel?s   You (.*)s$   We should be discussing you, not me.s   Why do you say that about me?s   Why do you care whether I %1?s   Why (.*)s(   Why don't you tell me the reason why %1?s   Why do you think %1?s   I want (.*)s(   What would it mean to you if you got %1?s   Why do you want %1?s    What would you do if you got %1?s&   If you got %1, then what would you do?s   (.*) mother(.*)s   Tell me more about your mother.s1   What was your relationship with your mother like?s"   How do you feel about your mother?s,   How does this relate to your feelings today?s$   Good family relations are important.s   (.*) father(.*)s   Tell me more about your father.s"   How did your father make you feel?s"   How do you feel about your father?sF   Does your relationship with your father relate to your feelings today?s7   Do you have trouble showing affection with your family?s   (.*) child(.*)s&   Did you have close friends as a child?s'   What is your favorite childhood memory?s8   Do you remember any dreams or nightmares from childhood?s+   Did the other children sometimes tease you?sJ   How do you think your childhood experiences relate to your feelings today?s   (.*)\?s   Why do you ask that?s9   Please consider whether you can answer your own question.s(   Perhaps the answer lies within yourself?s   Why don't you tell me?t   quits   Thank you for talking with me.s	   Good-bye.s/   Thank you, that will be $150.  Have a good day!s   (.*)s   Please tell me more.s6   Let's change focus a bit... Tell me about your family.s   Can you elaborate on that?s   Why do you say that %1?s   I see.s   Very interesting.s   %1.s$   I see.  And what does that tell you?s   How does that make you feel?s"   How do you feel when you say that?c           C   s+   d GHd GHd GHd d GHd GHt  i   d  S(   Ns   Therapist
---------sC   Talk to the program by typing in plain English, using normal upper-s@   and lower-case letters and punctuation.  Enter "quit" when done.t   =iH   s"   Hello.  How are you feeling today?(   t   eliza_chatbott   converse(    (    (    s%   /p/zhu/06/nlp/nltk/nltk/chat/eliza.pyt
   eliza_chat   s    	c           C   s   t    d  S(   N(   R   (    (    (    s%   /p/zhu/06/nlp/nltk/nltk/chat/eliza.pyt   demo   s    t   __main__N(   s   Why do you need %1?s#   Would it really help you to get %1?s   Are you sure you need %1?(   s   Do you really think I don't %1?s   Perhaps eventually I will %1.s   Do you really want me to %1?(   s&   Do you think you should be able to %1?s#   If you could %1, what would you do?s!   I don't know -- why can't you %1?s   Have you really tried?(   s   How do you know you can't %1?s"   Perhaps you could %1 if you tried.s!   What would it take for you to %1?(   s&   Did you come to me because you are %1?s   How long have you been %1?s   How do you feel about being %1?(   s    How does being %1 make you feel?s   Do you enjoy being %1?s   Why do you tell me you're %1?s   Why do you think you're %1?(   s#   Why does it matter whether I am %1?s%   Would you prefer it if I were not %1?s   Perhaps you believe I am %1.s!   I may be %1 -- what do you think?(   s   Why do you ask?s%   How would an answer to that help you?s   What do you think?(   s   How do you suppose?s)   Perhaps you can answer your own question.s    What is it you're really asking?(   s   Is that the real reason?s    What other reasons come to mind?s(   Does that reason apply to anything else?s   If %1, what else must be true?(   s/   There are many times when no apology is needed.s-   What feelings do you have when you apologize?(   s*   Hello... I'm glad you could drop by today.s   Hi there... how are you today?s!   Hello, how are you feeling today?(   s   Do you doubt %1?s   Do you really think so?s   But you're not sure %1?(   s    Tell me more about your friends.s/   When you think of a friend, what comes to mind?s/   Why don't you tell me about a childhood friend?(   s   You seem quite sure.s    OK, but can you elaborate a bit?(   s    Are you really talking about me?s+   Does it seem strange to talk to a computer?s   How do computers make you feel?s$   Do you feel threatened by computers?(   s   Do you think it is %1?s%   Perhaps it's %1 -- what do you think?s!   If it were %1, what would you do?s   It could well be that %1.(   s   You seem very certain.s=   If I told you that it probably isn't %1, what would you feel?(   s    What makes you think I can't %1?s   If I could %1, then what?s   Why do you ask if I can %1?(   s   Perhaps you don't want to %1.s   Do you want to be able to %1?s   If you could %1, would you?(   s   Why do you think I am %1?s(   Does it please you to think that I'm %1?s#   Perhaps you would like me to be %1.s-   Perhaps you're really talking about yourself?(   s   Why do you say I am %1?s   Why do you think I am %1?s    Are we talking about you, or me?(   s   Don't you really %1?s   Why don't you %1?s   Do you want to %1?(   s(   Good, tell me more about these feelings.s   Do you often feel %1?s   When do you usually feel %1?s!   When you feel %1, what do you do?(   s"   Why do you tell me that you've %1?s   Have you really %1?s,   Now that you have %1, what will you do next?(   s#   Could you explain why you would %1?s   Why would you %1?s!   Who else knows that you would %1?(   s   Do you think there is %1?s   It's likely that there is %1.s   Would you like there to be %1?(   s   I see, your %1.s   Why do you say that your %1?s   When your %1, how do you feel?(   s$   We should be discussing you, not me.s   Why do you say that about me?s   Why do you care whether I %1?(   s(   Why don't you tell me the reason why %1?s   Why do you think %1?(   s(   What would it mean to you if you got %1?s   Why do you want %1?s    What would you do if you got %1?s&   If you got %1, then what would you do?(   s   Tell me more about your mother.s1   What was your relationship with your mother like?s"   How do you feel about your mother?s,   How does this relate to your feelings today?s$   Good family relations are important.(   s   Tell me more about your father.s"   How did your father make you feel?s"   How do you feel about your father?sF   Does your relationship with your father relate to your feelings today?s7   Do you have trouble showing affection with your family?(   s&   Did you have close friends as a child?s'   What is your favorite childhood memory?s8   Do you remember any dreams or nightmares from childhood?s+   Did the other children sometimes tease you?sJ   How do you think your childhood experiences relate to your feelings today?(   s   Why do you ask that?s9   Please consider whether you can answer your own question.s(   Perhaps the answer lies within yourself?s   Why don't you tell me?(   s   Thank you for talking with me.s	   Good-bye.s/   Thank you, that will be $150.  Have a good day!(
   s   Please tell me more.s6   Let's change focus a bit... Tell me about your family.s   Can you elaborate on that?s   Why do you say that %1?s   I see.s   Very interesting.s   %1.s$   I see.  And what does that tell you?s   How does that make you feel?s"   How do you feel when you say that?(   t   utilt   pairst   Chatt   reflectionsR   R   R   t   __name__(    (    (    s%   /p/zhu/06/nlp/nltk/nltk/chat/eliza.pys   <module>   sX  
                                                                                             			