Home » Immortals »

ELIZA Chat

There are several "operators" available:

  pattern matching:
        |        or
        &       and
        ~       and-not
  special pattern matching:
        ^        match start
        =       exact match
  pass 1 scan operators:
        #        remark
        "        output to stderr
        '         output to stdout
  response operators:
        1-9      weights are the numerals.
        %       include the rest of the response.
 
Some special notes:
        #,',",weights, and the first ( must be in column one. )

Syntax of a simple pattern match:

( A | B & C ~ ( D | E | F))

The above would mean if A or B and C and-not D or E or F was in the
sentence then pick one of the responses.

The responses take on the form:

9this is most likely
4somewhat likely
1least likely

However, when a response is triggered, its weight is decreased by one.
 

Since the above makes little sense, an example will illustrate the use of
Chat databases better.

	    

#!/usr/bin/chat
#change the above line if the chat executable is somewhere else.
#an example of a "Chat" database
"this will be printed to stderr
'this will be printed to stdout (apple & ( orange | lemon ) ~ pine cones)
9You must have a citrus fruit and an apple. 3you do not have a pine cone but you have an apple.
2what was % suppose to mean? (=your sentence matches this one exactly)
2you are unimaginative. 9you lack imagination.