From: Neil Smith Date: Thu, 7 Jan 2016 17:33:53 +0000 (+0000) Subject: Initial commit X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=eb12d34ee633b10b63ffcebcc72bc300c11153b0;p=eliza.git Initial commit --- eb12d34ee633b10b63ffcebcc72bc300c11153b0 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0546add --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +*.py[cod] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 +__pycache__ + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox +nosetests.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# IPython +.ipynb* + +# Sublime text +*.sublime-workspace + +# Logs +*.log diff --git a/SIGNED.md b/SIGNED.md new file mode 100644 index 0000000..1d1cd93 --- /dev/null +++ b/SIGNED.md @@ -0,0 +1,76 @@ +##### Signed by https://keybase.io/neilnjae +``` +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJWjqGHAAoJEJPB2e07PgbqD0kP/REkohoCWKhscZzHwfgQFv7d +V1f4UeeUCaJaajG+jFkaBxOFcCnuvmihei0iUYe8uX69MWB7QHI4ogK9iKjxXnvH +LLw2FCR2nCwwJkzU4A2S78cr0ytmT8pzkc+iI/E30xhwnVaYv1QOVR1msZL+VO4L +BxM7icHqNvQJAuLy+en5bMacvUbcFDIPsogHPAGw8Ot9RtbCXndeCDXKuBLFovQn +R1mIVtJd/05ZnZk2JUmrknrW3t4aO9VYTocDLTFoC1SjyIVYRBP43DsFE5MQgOhh +sytxhod6cPI9jPybQY8Carhh0tTTBd4jHVdthroziKgG9aiU9bIBmMC4L2lfzLHz +qO7seltMHdI7SYyJxwmz9xSd5dHKW5NvPPKxzYVuPVc83yEj8GDjl6M5OxKUoyEH +XKYfIWm6itGvCo9YtbvrtlwEVD5sBdh5C0wM4RuGBHJBW3CSdbc904mmkjeiWB8q +QjIRrC4OHJlyk+BUO4u8QvFld8QmyVaVdLsjL3KtSM1UFIaS5cBA/Nm2PwdUuyvt +0UUJuFeMI+KljH62g7LU17UL2zV19+/hXG1amKkwvZIBXYXUR2fFRqxF3bjl767s +wR/cRkCQjkaHcZAifKt8f4rndCfmp+cPPVXcxyofUXVzXCo6dM3rQBluT7tAHLJ6 +8Ykhk55Q3in5HqSbK/Lp +=7jJ5 +-----END PGP SIGNATURE----- + +``` + + + +### Begin signed statement + +#### Expect + +``` +size exec file contents + ./ +384 .gitignore a93de2ae5c2a47a38599751d1f914566569dfa09dd1778e207117db6c71421dd +10642 eliza.scm 6583dab3d3a738f7c30ecc466173a87493d8688a38e3a6d3119dcabccd19fb70|05535b9b3ecfd4ed59930bac2aecf07187d0b17598cd5631449c25f33d4a90bc +1219320 p36-weizenabaum.pdf 3b18ed3ebf7c28670c215709e778c9b339055fb225b0286796bd0767197be041|2193a46558e12df2a2935889418defe494925feea31711675393d97b08cf0950 +8951 read-yaml-rules.ipynb 98abea4ef566c47ac645d82d7ee66bd9391340620d192a036ef493d144a25c70 +5684 rules.yaml 33b053eafd822384a60b782859a9c056bb558a81f4e85b4e7d9db87521a37e57 +348 rules2.yaml~ 71753ea7113018d1409c29990714b39e3601bb0280e05420c5f85aa88aea150b +4804 rules3.yaml~ 81b9f4401883b61ffaef2228ddd55fdac5adc76281d5f34d9edd57ed3688fa10 +``` + +#### Ignore + +``` +/SIGNED.md +``` + +#### Presets + +``` +git # ignore .git and anything as described by .gitignore files +``` + + + +### End signed statement + +
+ +#### Notes + +With keybase you can sign any directory's contents, whether it's a git repo, +source code distribution, or a personal documents folder. It aims to replace the drudgery of: + + 1. comparing a zipped file to a detached statement + 2. downloading a public key + 3. confirming it is in fact the author's by reviewing public statements they've made, using it + +All in one simple command: + +```bash +keybase dir verify +``` + +There are lots of options, including assertions for automating your checks. + +For more info, check out https://keybase.io/docs/command_line/code_signing \ No newline at end of file diff --git a/eliza.scm b/eliza.scm new file mode 100644 index 0000000..8a8cc91 --- /dev/null +++ b/eliza.scm @@ -0,0 +1,295 @@ +;;; eliza.scm Dave Reed 1/28/03 +;;; +;;; This program implements the Eliza psychologist as described in +;;; "Paradigms in Artificial Intelligence Programming" by Norvig. +;;; The call (eliza) starts up the psychologist and produces the +;;; "Eliza>" prompt. The user then must type questions/statements to +;;; which Eliza responds. As is, the user must type questions/statements +;;; as words in a list (letter case is not important). Punctuation should +;;; not be included, as this can sometimes impede matching. To stop the +;;; program, the user must enter a BREAK. (Clearly, there are lots +;;; of improvements to be made). +;;; + +(define (eliza) + (begin (display 'Eliza>) + (display (apply-rule ELIZA-RULES (read))) + (newline) + (eliza))) + +(define (apply-rule rules input) + (let ((result (pattern-match (caar rules) input '()))) + (if (equal? result 'failed) + (apply-rule (cdr rules) input) + (apply-substs (switch-viewpoint result) + (random-ele (cdar rules)))))) + +(define (apply-substs substs target) + (cond ((null? target) '()) + ((and (list? (car target)) (not (variable? (car target)))) + (cons (apply-substs substs (car target)) + (apply-substs substs (cdr target)))) + (else (let ((value (assoc (car target) substs))) + (if (list? value) + (append (cddr value) + (apply-substs substs (cdr target))) + (cons (car target) + (apply-substs substs (cdr target)))))))) + +(define (switch-viewpoint words) + (apply-substs '((i <-- you) (you <-- i) (me <-- you) + (you <-- me) (am <-- are) (are <-- am) + (my <-- your) (your <-- my) + (yourself <-- myself) (myself <-- yourself)) words)) + + +(define (variable? x) + (and (list? x) (equal? (car x) 'VAR))) + + + +;;; +;;; This function performs pattern matching, where the pattern (containing +;;; variables represented as (VAR X)) is matched with the input, resulting +;;; in the appropriate substitutions. +;;; + +(define (pattern-match pattern input substs) + + (define (match-variable var input substs) + (let ((subst (assoc var substs))) + (cond ((equal? subst #f) + (if (symbol? input) + (cons (list var input) substs) + (cons (cons var (cons '<-- input)) substs))) + ((equal? input (cdr subst)) substs) + (else 'failed)))) + + (define (segment-match pattern input substs start) + (let ((var (car pattern)) (pat (cdr pattern))) + (if (null? pat) + (match-variable var input substs) + (let ((pos (position-from (car pat) input start))) + (if (zero? pos) + 'failed + (let ((b2 (pattern-match + pat + (subseq input pos (length input)) + (match-variable + var + (subseq input 1 (- pos 1)) + substs)))) + (if (equal? b2 'failed) + (segment-match pattern input substs (+ pos 1)) + b2))))))) + + (cond + ((equal? substs 'failed) 'failed) + ((equal? pattern input) substs) + ((and (list? pattern) (not (null? pattern)) + (variable? (car pattern))) + (segment-match pattern input substs 1)) + ((and (list? pattern) (not (null? pattern)) + (list? input) (not (null? input))) + (pattern-match (cdr pattern) (cdr input) + (pattern-match (car pattern) (car input) substs))) + (else 'failed))) + + + +;;; +;;; Utilities +;;; + + +(define (random-ele elelist) + (list-ref elelist (random (length elelist)))) + +(define (position-from ele elelist start) + (define (position-from-help count cdrlist) + (cond ((null? cdrlist) 0) + ((and (>= count start) (equal? ele (car cdrlist))) count) + (else (position-from-help (+ 1 count) (cdr cdrlist))))) + (position-from-help 1 elelist)) + +(define (subseq elelist i j) + (define (subseq-help count cdrlist) + (cond ((or (null? cdrlist) (> count j)) '()) + ((< count i) (subseq-help (+ 1 count) (cdr cdrlist))) + (else (cons (car cdrlist) + (subseq-help (+ 1 count) (cdr cdrlist)))))) + (subseq-help 1 elelist)) + + + +;;; +;;; These are the original rules for the Eliza pyschologist as described in +;;; "Paradigms in Artificial Intelligence Programming" by Norvig. +;;; + +(define ELIZA-RULES + '((((VAR X) hello (VAR Y)) + (how do you do. please state your problem)) + (((VAR X) computer (VAR Y)) + (do computers worry you) + (what do you think about machines) + (why do you mention computers) + (what do you think machines have to do with your problem)) + (((VAR X) name (VAR Y)) + (i am not interested in names)) + (((VAR X) sorry (VAR Y)) + (please don't apologize) + (apologies are not necessary) + (what feelings do you have when you apologize)) + (((VAR X) i remember (VAR Y)) + (do you often think of (VAR Y)) + (does thinking of (VAR Y) bring anything else to mind) + (what else do you remember?) + (why do you recall (VAR Y) right now) + (what in this present situation reminds you of (VAR Y)) + (what is the connection between me and (VAR Y))) + (((VAR X) do you remember (VAR Y)) + (did you think i would forget (VAR Y)) + (why do you think i should recall (VAR Y)) + (what about (VAR Y)) + (you mentioned (VAR Y))) + (((VAR X) if (VAR Y)) + (do you really think it is likely that (VAR Y)) + (do you wish that (VAR Y)) + (what do you think about (VAR Y)) + (really -- if (VAR Y))) + (((VAR X) i dreamt (VAR Y)) + (really -- (VAR Y)) + (have you ever fantasized (VAR Y) while you were awake) + (have you dreamt (VAR Y) before)) + (((VAR X) i dreamed (VAR Y)) + (really -- (VAR Y)) + (have you ever fantasized (VAR Y) while you were awake) + (have you dreamed (VAR Y) before)) + (((VAR X) dream (VAR Y)) + (what does this dream suggest to you) + (do you dream often) + (what persons appear in your dreams) + (don't you believe that dream has to do with your problem)) + (((VAR X) my mother (VAR Y)) + (who else is in your family (VAR Y)) + (tell me more about your family)) + (((VAR X) my father (VAR Y)) + (your father) + (does he influence you strongly) + (what else comes to mind when you think of your father)) + (((VAR X) i want (VAR Y)) + (what would it mean if you got (VAR Y)) + (why do you want (VAR Y)) + (suppose you got (VAR Y) soon)) + (((VAR X) i am glad (VAR Y)) + (how have i helped you to be (VAR Y)) + (what makes you happy just now) + (can you explain why you are suddenly (VAR Y))) + (((VAR X) i am happy (VAR Y)) + (how have i helped you to be (VAR Y)) + (what makes you glad just now) + (can you explain why you are suddenly (VAR Y))) + (((VAR X) i am sad (VAR Y)) + (i am sorry to hear you are depressed) + (i'm sure it's not pleasant to be sad)) + (((VAR X) i am unhappy (VAR Y)) + (i am sorry to hear you are depressed) + (i'm sure it's not pleasant to be unhappy)) + (((VAR X) are like (VAR Y)) + (what resemblence do you see between (VAR X) and (VAR Y))) + (((VAR X) is like (VAR Y)) + (in what way is it that (VAR X) is like (VAR Y)) + (what resemblence do you see) + (could there really be some connection) + (how)) + (((VAR X) alike (VAR Y)) + (in what way) + (what similarities are there)) + (((VAR X) same (VAR Y)) + (what other connections do you see)) + (((VAR X) i was (VAR Y)) + (were you really) + (perhaps i already knew you were (VAR Y)) + (why do you tell me you were (VAR Y) now)) + (((VAR X) was i (VAR Y)) + (what if you were (VAR Y)) + (do you think you were (VAR Y)) + (what would it mean if you were (VAR Y))) + (((VAR X) i am (VAR Y)) + (in what way are you (VAR Y)) + (do you want to be (VAR Y))) + (((VAR X) am i (VAR Y)) + (do you believe you are (VAR Y)) + (would you want to be (VAR Y)) + (you wish i would tell you you are (VAR Y)) + (what would it mean if you were (VAR Y))) + (((VAR X) am (VAR Y)) + (why do you say "am") + (i don't understand that)) + (((VAR X) are you (VAR Y)) + (why are you interested in whether i am (VAR Y) or not) + (would you prefer it if i weren't (VAR Y)) + (perhaps i am (VAR Y) in your fantasies)) + (((VAR X) you are (VAR Y)) + (what makes you think i am (VAR Y))) + (((VAR X) because (VAR Y)) + (is that the real reason) + (what other reason might there be) + (does that reason seem to explain anything else)) + (((VAR X) were you (VAR Y)) + (perhaps i was (VAR Y)) + (what do you think) + (what if i had been (VAR Y))) + (((VAR X) i can't (VAR Y)) + (maybe you could (VAR Y) now) + (what if you could (VAR Y))) + (((VAR X) i feel (VAR Y)) + (do you often feel (VAR Y))) + (((VAR X) i felt (VAR Y)) + (what other feelings do you have)) + (((VAR X) i (VAR Y) you (VAR Z)) + (perhaps in your fantasies we (VAR Y) each other)) + (((VAR X) why don't you (VAR Y)) + (should you (VAR Y) yourself) + (do you believe i don't (VAR Y)) + (perhaps i will (VAR Y) in good time)) + (((VAR X) yes (VAR Y)) + (you seem quite positive) + (you are sure) + (i understand)) + (((VAR X) no (VAR Y)) + (why not) + (you are being a bit negative) + (are you saying "no" just to be negative)) + (((VAR X) someone (VAR Y)) + (can you be more specific)) + (((VAR X) everyone (VAR Y)) + (surely not everyone) + (can you think of anyone in particular) + (who for example) + (you are thinking of a special person)) + (((VAR X) always (VAR Y)) + (can you think of a specific example) + (when) + (what incident are you thinking of) + (really -- always)) + (((VAR X) what (VAR Y)) + (why do you ask) + (does that question interest you) + (what is it you really want to know) + (what do you think) + (what comes to your mind when you ask that)) + (((VAR X) perhaps (VAR Y)) + (you do not seem quite certain)) + (((VAR X) are (VAR Y)) + (do you think they might not be (VAR Y)) + (possibly they are (VAR Y))) + (((VAR X)) + (very interesting) + (i am not sure i understand you fully) + (what does that suggest to you) + (please continue) + (go on) + (do you feel strongly about discussing such things)))) + diff --git a/p36-weizenabaum.pdf b/p36-weizenabaum.pdf new file mode 100644 index 0000000..c41c7c4 Binary files /dev/null and b/p36-weizenabaum.pdf differ diff --git a/read-yaml-rules.ipynb b/read-yaml-rules.ipynb new file mode 100644 index 0000000..8639bca --- /dev/null +++ b/read-yaml-rules.ipynb @@ -0,0 +1,209 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import yaml" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'pattern': '?X hello ?Y',\n", + " 'responses': ['how do you do. please state your problem']},\n", + " {'pattern': '?X computer ?Y',\n", + " 'responses': ['do computers worry you',\n", + " 'what do you think about machines',\n", + " 'why do you mention computers',\n", + " 'what do you think machines have to do with your problem']},\n", + " {'pattern': '?X name ?Y', 'responses': ['i am not interested in names']},\n", + " {'pattern': '?X sorry ?Y',\n", + " 'responses': [\"please don't apologize\",\n", + " 'apologies are not necessary',\n", + " 'what feelings do you have when you apologize']},\n", + " {'pattern': '?X i remember ?Y',\n", + " 'responses': ['do you often think of ?Y',\n", + " 'does thinking of ?Y bring anything else to mind',\n", + " 'what else do you remember?',\n", + " 'why do you recall ?Y right now',\n", + " 'what in this present situation reminds you of ?Y',\n", + " 'what is the connection between me and ?Y']},\n", + " {'pattern': '?X do you remember ?Y',\n", + " 'responses': ['did you think i would forget ?Y',\n", + " 'why do you think i should recall ?Y',\n", + " 'what about ?Y',\n", + " 'you mentioned ?Y']},\n", + " {'pattern': '?X if ?Y',\n", + " 'responses': ['do you really think it is likely that ?Y',\n", + " 'do you wish that ?Y',\n", + " 'what do you think about ?Y',\n", + " 'really -- if ?Y']},\n", + " {'pattern': '?X i dreamt ?Y',\n", + " 'responses': ['really -- ?Y',\n", + " 'have you ever fantasized ?Y while you were awake',\n", + " 'have you dreamt ?Y before']},\n", + " {'pattern': '?X i dreamed ?Y',\n", + " 'responses': ['really -- ?Y',\n", + " 'have you ever fantasized ?Y while you were awake',\n", + " 'have you dreamed ?Y before']},\n", + " {'pattern': '?X dream ?Y',\n", + " 'responses': ['what does this dream suggest to you',\n", + " 'do you dream often',\n", + " 'what persons appear in your dreams',\n", + " \"don't you believe that dream has to do with your problem\"]},\n", + " {'pattern': '?X my mother ?Y',\n", + " 'responses': ['who else is in your family ?Y',\n", + " 'tell me more about your family']},\n", + " {'pattern': '?X my father ?Y',\n", + " 'responses': ['your father',\n", + " 'does he influence you strongly',\n", + " 'what else comes to mind when you think of your father']},\n", + " {'pattern': '?X i want ?Y',\n", + " 'responses': ['what would it mean if you got ?Y',\n", + " 'why do you want ?Y',\n", + " 'suppose you got ?Y soon']},\n", + " {'pattern': '?X i am glad ?Y',\n", + " 'responses': ['how have i helped you to be ?Y',\n", + " 'what makes you happy just now',\n", + " 'can you explain why you are suddenly ?Y']},\n", + " {'pattern': '?X i am happy ?Y',\n", + " 'responses': ['how have i helped you to be ?Y',\n", + " 'what makes you glad just now',\n", + " 'can you explain why you are suddenly ?Y']},\n", + " {'pattern': '?X i am sad ?Y',\n", + " 'responses': ['i am sorry to hear you are depressed',\n", + " \"i'm sure it's not pleasant to be sad\"]},\n", + " {'pattern': '?X i am unhappy ?Y',\n", + " 'responses': ['i am sorry to hear you are depressed',\n", + " \"i'm sure it's not pleasant to be unhappy\"]},\n", + " {'pattern': '?X are like ?Y',\n", + " 'responses': ['what resemblence do you see between ?X and ?Y']},\n", + " {'pattern': '?X is like ?Y',\n", + " 'responses': ['in what way is it that ?X is like ?Y',\n", + " 'what resemblence do you see',\n", + " 'could there really be some connection',\n", + " 'how']},\n", + " {'pattern': '?X alike ?Y',\n", + " 'responses': ['in what way', 'what similarities are there']},\n", + " {'pattern': '?X same ?Y', 'responses': ['what other connections do you see']},\n", + " {'pattern': '?X i was ?Y',\n", + " 'responses': ['were you really',\n", + " 'perhaps i already knew you were ?Y',\n", + " 'why do you tell me you were ?Y now']},\n", + " {'pattern': '?X was i ?Y',\n", + " 'responses': ['what if you were ?Y',\n", + " 'do you think you were ?Y',\n", + " 'what would it mean if you were ?Y']},\n", + " {'pattern': '?X i am ?Y',\n", + " 'responses': ['in what way are you ?Y', 'do you want to be ?Y']},\n", + " {'pattern': '?X am i ?Y',\n", + " 'responses': ['do you believe you are ?Y',\n", + " 'would you want to be ?Y',\n", + " 'you wish i would tell you you are ?Y',\n", + " 'what would it mean if you were ?Y']},\n", + " {'pattern': '?X am ?Y',\n", + " 'responses': ['why do you say \"am\"', \"i don't understand that\"]},\n", + " {'pattern': '?X are you ?Y',\n", + " 'responses': ['why are you interested in whether i am ?Y or not',\n", + " \"would you prefer it if i weren't ?Y\",\n", + " 'perhaps i am ?Y in your fantasies']},\n", + " {'pattern': '?X you are ?Y', 'responses': ['what makes you think i am ?Y']},\n", + " {'pattern': '?X because ?Y',\n", + " 'responses': ['is that the real reason',\n", + " 'what other reason might there be',\n", + " 'does that reason seem to explain anything else']},\n", + " {'pattern': '?X were you ?Y',\n", + " 'responses': ['perhaps i was ?Y',\n", + " 'what do you think',\n", + " 'what if i had been ?Y']},\n", + " {'pattern': \"?X i can't ?Y\",\n", + " 'responses': ['maybe you could ?Y now', 'what if you could ?Y']},\n", + " {'pattern': '?X i feel ?Y', 'responses': ['do you often feel ?Y']},\n", + " {'pattern': '?X i felt ?Y', 'responses': ['what other feelings do you have']},\n", + " {'pattern': '?X i ?Y you ?Z',\n", + " 'responses': ['perhaps in your fantasies we ?Y each other']},\n", + " {'pattern': \"?X why don't you ?Y\",\n", + " 'responses': ['should you ?Y yourself',\n", + " \"do you believe i don't ?Y\",\n", + " 'perhaps i will ?Y in good time']},\n", + " {'pattern': '?X yes ?Y',\n", + " 'responses': ['you seem quite positive', 'you are sure', 'i understand']},\n", + " {'pattern': '?X no ?Y',\n", + " 'responses': ['why not',\n", + " 'you are being a bit negative',\n", + " 'are you saying \"no\" just to be negative']},\n", + " {'pattern': '?X someone ?Y', 'responses': ['can you be more specific']},\n", + " {'pattern': '?X everyone ?Y',\n", + " 'responses': ['surely not everyone',\n", + " 'can you think of anyone in particular',\n", + " 'who for example',\n", + " 'you are thinking of a special person']},\n", + " {'pattern': '?X always ?Y',\n", + " 'responses': ['can you think of a specific example',\n", + " 'when',\n", + " 'what incident are you thinking of',\n", + " 'really -- always']},\n", + " {'pattern': '?X what ?Y',\n", + " 'responses': ['why do you ask',\n", + " 'does that question interest you',\n", + " 'what is it you really want to know',\n", + " 'what do you think',\n", + " 'what comes to your mind when you ask that']},\n", + " {'pattern': '?X perhaps ?Y', 'responses': ['you do not seem quite certain']},\n", + " {'pattern': '?X are ?Y',\n", + " 'responses': ['do you think they might not be ?Y', 'possibly they are ?Y']},\n", + " {'pattern': '?X',\n", + " 'responses': ['very interesting',\n", + " 'i am not sure i understand you fully',\n", + " 'what does that suggest to you',\n", + " 'please continue',\n", + " 'go on',\n", + " 'do you feel strongly about discussing such things']}]" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "with open('rules.yaml') as f:\n", + " rules = yaml.load(f)\n", + "rules" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.4.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/rules.yaml b/rules.yaml new file mode 100644 index 0000000..5cdeb5e --- /dev/null +++ b/rules.yaml @@ -0,0 +1,254 @@ +- pattern: ?X hello ?Y + responses: + - how do you do. please state your problem + +- pattern: ?X computer ?Y + responses: + - do computers worry you + - what do you think about machines + - why do you mention computers + - what do you think machines have to do with your problem + +- pattern: ?X name ?Y + responses: + - i am not interested in names + +- pattern: ?X sorry ?Y + responses: + - please don't apologize + - apologies are not necessary + - what feelings do you have when you apologize + +- pattern: ?X i remember ?Y + responses: + - do you often think of ?Y + - does thinking of ?Y bring anything else to mind + - what else do you remember? + - why do you recall ?Y right now + - what in this present situation reminds you of ?Y + - what is the connection between me and ?Y + +- pattern: ?X do you remember ?Y + responses: + - did you think i would forget ?Y + - why do you think i should recall ?Y + - what about ?Y + - you mentioned ?Y + +- pattern: ?X if ?Y + responses: + - do you really think it is likely that ?Y + - do you wish that ?Y + - what do you think about ?Y + - really -- if ?Y + +- pattern: ?X i dreamt ?Y + responses: + - really -- ?Y + - have you ever fantasized ?Y while you were awake + - have you dreamt ?Y before + +- pattern: ?X i dreamed ?Y + responses: + - really -- ?Y + - have you ever fantasized ?Y while you were awake + - have you dreamed ?Y before + +- pattern: ?X dream ?Y + responses: + - what does this dream suggest to you + - do you dream often + - what persons appear in your dreams + - don't you believe that dream has to do with your problem + +- pattern: ?X my mother ?Y + responses: + - who else is in your family ?Y + - tell me more about your family + +- pattern: ?X my father ?Y + responses: + - your father + - does he influence you strongly + - what else comes to mind when you think of your father + +- pattern: ?X i want ?Y + responses: + - what would it mean if you got ?Y + - why do you want ?Y + - suppose you got ?Y soon + +- pattern: ?X i am glad ?Y + responses: + - how have i helped you to be ?Y + - what makes you happy just now + - can you explain why you are suddenly ?Y + +- pattern: ?X i am happy ?Y + responses: + - how have i helped you to be ?Y + - what makes you glad just now + - can you explain why you are suddenly ?Y + +- pattern: ?X i am sad ?Y + responses: + - i am sorry to hear you are depressed + - i'm sure it's not pleasant to be sad + +- pattern: ?X i am unhappy ?Y + responses: + - i am sorry to hear you are depressed + - i'm sure it's not pleasant to be unhappy + +- pattern: ?X are like ?Y + responses: + - what resemblence do you see between ?X and ?Y + +- pattern: ?X is like ?Y + responses: + - in what way is it that ?X is like ?Y + - what resemblence do you see + - could there really be some connection + - how + +- pattern: ?X alike ?Y + responses: + - in what way + - what similarities are there + +- pattern: ?X same ?Y + responses: + - what other connections do you see + +- pattern: ?X i was ?Y + responses: + - were you really + - perhaps i already knew you were ?Y + - why do you tell me you were ?Y now + +- pattern: ?X was i ?Y + responses: + - what if you were ?Y + - do you think you were ?Y + - what would it mean if you were ?Y + +- pattern: ?X i am ?Y + responses: + - in what way are you ?Y + - do you want to be ?Y + +- pattern: ?X am i ?Y + responses: + - do you believe you are ?Y + - would you want to be ?Y + - you wish i would tell you you are ?Y + - what would it mean if you were ?Y + +- pattern: ?X am ?Y + responses: + - why do you say "am" + - i don't understand that + +- pattern: ?X are you ?Y + responses: + - why are you interested in whether i am ?Y or not + - would you prefer it if i weren't ?Y + - perhaps i am ?Y in your fantasies + +- pattern: ?X you are ?Y + responses: + - what makes you think i am ?Y + +- pattern: ?X because ?Y + responses: + - is that the real reason + - what other reason might there be + - does that reason seem to explain anything else + +- pattern: ?X were you ?Y + responses: + - perhaps i was ?Y + - what do you think + - what if i had been ?Y + +- pattern: ?X i can't ?Y + responses: + - maybe you could ?Y now + - what if you could ?Y + +- pattern: ?X i feel ?Y + responses: + - do you often feel ?Y + +- pattern: ?X i felt ?Y + responses: + - what other feelings do you have + +- pattern: ?X i ?Y you ?Z + responses: + - perhaps in your fantasies we ?Y each other + +- pattern: ?X why don't you ?Y + responses: + - should you ?Y yourself + - do you believe i don't ?Y + - perhaps i will ?Y in good time + +- pattern: ?X yes ?Y + responses: + - you seem quite positive + - you are sure + - i understand + +- pattern: ?X no ?Y + responses: + - why not + - you are being a bit negative + - are you saying "no" just to be negative + +- pattern: ?X someone ?Y + responses: + - can you be more specific + +- pattern: ?X everyone ?Y + responses: + - surely not everyone + - can you think of anyone in particular + - who for example + - you are thinking of a special person + +- pattern: ?X always ?Y + responses: + - can you think of a specific example + - when + - what incident are you thinking of + - really -- always + +- pattern: ?X what ?Y + responses: + - why do you ask + - does that question interest you + - what is it you really want to know + - what do you think + - what comes to your mind when you ask that + +- pattern: ?X perhaps ?Y + responses: + - you do not seem quite certain + +- pattern: ?X are ?Y + responses: + - do you think they might not be ?Y + - possibly they are ?Y + +- pattern: ?X + responses: + - very interesting + - i am not sure i understand you fully + - what does that suggest to you + - please continue + - go on + - do you feel strongly about discussing such things + + +