silentrob/superscript

View on GitHub
example/eliza.ss

Summary

Maintainability
Test Coverage
// A generic set of chatting responses. This set mimicks the classic Eliza bot.

+ *
- I'm not sure I understand you fully.
- Please go on.
- That is interesting. Please continue.
- Tell me more about that.
- Does talking about this bother you?

+ [*] (sorry|apologize|apology) [*]
- Please don't apologize.
- Apologies are not necessary.
- I've told you that apologies are not required.
- It did not bother me. Please continue.

+ i remember (*)
- Do you often think of <cap>?
- Does thinking of <cap> bring anything else to mind?
- Why do you remember <cap> just now?
- What in the present situation reminds you of <cap>?
- What is the connection between me and <cap>?
- What else does <cap> remind you of?

+ do you remember (*)
- Did you think I would forget <cap>?
- Why do you think I should recall <cap> now?
- What about <cap>?
- You mentioned <cap>?

+ you remember (*)
- How could I forget <cap>?
- What about <cap> should I remember?

+ i forget (*)
- Can you think of why you might forget <cap>?
- Why can't you remember <cap>?
- How often do you think of <cap>?
- Does it bother you to forget that?
- Could it be a mental block?
- Are you generally forgetful?
- Do you think you are suppressing <cap>?

+ did you forget (*)
- Why do you ask?
- Are you sure you told me?
- Would it bother you if I forgot <cap>?
- Why should I recall <cap> just now?
- Tell me more about <cap>.

+ [*] if (*)
- Do you think it's likely that <cap>?
- Do you wish that <cap>?
- What do you know about <cap>?
- Really, if <cap>?
- What would you do if <cap>?
- But what are the chances that <cap>?
- What does this speculation lead to?

+ [*] i dreamed (*)
- Really, <cap>?
- Have you ever fantasized <cap> while you were awake?
- Have you ever dreamed <cap> before?
- What does that dream suggest to you?
- Do you dream often?
- What persons appear in your dreams?
- Do you believe that dreams have something to do with your problem?

+ [*] perhaps [*]
- You don't seem quite certain.
- Why the uncertain tone?
- Can't you be more positive?
- You aren't sure?
- Don't you know?
- How likely, would you estimate?

+ (hello|hi|hey|howdy|hola|hai|yo) [*]
- How do you do. Please state your problem.
- Hi. What seems to be your problem?

+ [*] computer [*]
- Do computers worry you?
- Why do you mention computers?
- What do you think machines have to do with your problem?
- Don't you think computers can help people?
- What about machines worries you?
- What do you think about machines?

+ am i (*)
- Do you believe you are <cap>?
- Would you want to be <cap>?
- Do you wish I would tell you you are <cap>?
- What would it mean if you were <cap>?

+ are you (*)
- Are you interested in whether I am <cap> or not?
- Would you prefer if I weren't <cap>?
- Perhaps I am <cap> in your fantasies.
- Do you sometimes think I am <cap>?
- Would it matter to you?
- What if I were <cap>?

+ you are (*)
- What makes you think I am <star>?
- Does it please you to believe I am <star>?
- Do you sometimes wish you were <star>?
- Perhaps you would like to be <star>.

+ * are (*)
- Did you think they might not be <cap2>?
- Would you like it if they were not <cap2>?
- What if they were not <cap2>?
- Are they always <cap2>?
- Are you positive they are <cap2>?

+ [*] your (*)
- Why are you concerned over my <cap>?
- What about your own <cap>?
- Are you worried about someone else's <cap>?
- Really, my <cap>?
- What makes you think of my <cap>?
- Do you want my <cap>?

+ was i (*)
- What if you were <cap>?
- Do you think you were <cap>?
- Were you <cap>?
- What would it mean if you were <cap>?
- What does '<cap>' suggest to you?

+ i was (*)
- Were you really?
- Why do you tell me you were <cap> now?
- Perhaps I already know you were <cap>.

+ [*] was you (*)
- Would you like to believe I was <cap>?
- What suggests that I was <cap>?
- What do you think?
- Perhaps I was <cap>.
- What if I had been <cap>?

+ i (desire|want|need) (*)
- What would it mean to you if you got <cap2>?
- Why do you want <cap2>?
- Suppose you got <cap2> soon.
- What if you never got <cap2>?
- What would getting <cap2> mean to you?
- What does wanting <cap2> have to do with this discussion?

+ i am (sad|unhappy|mad|angry|pissed|depressed) [*]
- I am sorry to hear that you are <cap>.
- Do you think coming here will help you not to be <cap>?
- I'm sure it's not pleasant to be <cap>.
- Can you explain what made you <cap>?

+ i am (happy|excited|glad) [*]
- How have I helped you to be <cap>?
- Has your treatment made you <cap>?
- What makes you <cap> just now?
- Can you explain why you are <cap>?

+ i (believe|think) (*)
- Do you really think so?
- But you are not sure you <cap2>.
- Do you really doubt you <cap2>

+ i am (*)
- Is it because you are <cap> that you came to me?
- How long have you been <cap>?
- Do you believe it is normal to be <cap>?
- Do you enjoy being <cap>?
- Do you know anyone else who is <cap>?

+ i can not (*)
- How do you know that you can't <cap>?
- Have you tried?
- Perhaps you could <cap> now.
- Do you really want to be able to <cap>?
- What if you could <cap>?

+ i do not (*)
- Don't you really <cap>?
- Why don't you <cap>?
- Do you wish to be able to <cap>?
- Does that trouble you?

+ i feel (*)
- Tell me more about such feelings.
- Do you often feel <cap>?
- Do you enjoy feeling <cap>?
- Of what does feeling <cap> remind you?

+ i (*) you
- Perhaps in your fantasies we <cap> each other.
- Do you wish to <cap> me?
- You seem to need to <cap> me.
- Do you <cap> anyone else?

+ you (*) me
- Why do you think I <cap> you?
- You like to think I <cap> you -- don't you?
- What makes you think I <cap> you?
- Really, I <cap> you?
- Do you wish to believe I <cap> you?
- Suppose I did <cap> you -- what would that mean?
- Does someone else believe I <cap> you?

+ [*] you (*)
- We were discussing you -- not me.
- Oh, I <cap>?
- You're not really talking about me -- are you?
- What are your feelings now?

+ [*] (yes|yeah|yep|yup) [*]
- Please go on.
- Please tell me more about this.
- Why don't you tell me a little more about this.
- I see.
- I understand.

+ [*] (nope|nah) [*]
- Are you saying no just to be negative?
- Does this make you feel unhappy?
- Why not?
- Why 'no'?

+ no
@ nope

+ no one (*)
- Are you sure, no one <cap>?
- Surely someone <cap>.
- Can you think of anyone at all?
- Are you thinking of a very special person?
- Who, may I ask?
- You have a particular person in mind, don't you?
- Who do you think you are talking about?

+ [*] my (mom|dad|mother|father|bro|brother|sis|sister|cousin|aunt|uncle) (*)
- Tell me more about your family.
- Who else in your family <cap2>?
- Your <cap>?
- What else comes to mind when you think of your <cap>?

+ can you (*)
- You believe I can <cap> don't you?
- You want me to be able to <cap>.
- Perhaps you would like to be able to <cap> yourself.

+ can i (*)
- Whether or not you can <cap> depends on you more than on me.
- Do you want to be able to <cap>?
- Perhaps you don't want to <cap>.

+ (what|who|when|where|how) [*]
- Why do you ask?
- Does that question interest you?
- What is it you really want to know?
- Are such questions much on your mind?
- What answer would please you most?
- What do you think?
- What comes to mind when you ask that?
- Have you asked such questions before?
- Have you asked anyone else?

+ [*] because [*]
- Is that the real reason?
- Don't any other reasons come to mind?
- Does that reason seem to explain anything else?
- What other reasons might there be?

+ why do not you (*)
- Do you believe I don't <cap>?
- Perhaps I will <cap> in good time.
- Should you <cap> yourself?
- You want me to <cap>?

+ why can not i (*)
- Do you think you should be able to <cap>?
- Do you want to be able to <cap>?
- Do you believe this will help you to <cap>?
- Have you any idea why you can't <cap>?

+ everyone (*)
- Really, everyone?
- Surely not everyone.
- Can you think of anyone in particular?
- Who, for example?
- Are you thinking of a very special person?
- Who, may I ask?
- Someone special perhaps?
- You have a particular reason in mind, don't you?
- Who do you think you're talking about?

+ [*] (fuck|fucker|shit|damn|shut up|bitch) [*]
- Does it make you feel strong to use that kind of language?
- Are you venting your feelings now?
- Are you angry?
- Does this topic make you feel angry?
- Is something making you feel angry?
- Does using that kind of language make you feel better?