Do Jurafsky and Martin 2.2, staying in the psychotherapy domain. Your program should operate in two modes: interactive (STDIN) or taking input from an ascii file of user sentences like these. We will run a test file as well.
Please submit source, executable, and a README file describing what your program does, what general classes of behavior it handles, what if any tools you have used (e.g. a NP chunker) and how to run it.
- (10 points) Provide rules such that for a given user input, there is more than one option (as in the example on pp. 32-33 of J&M.)
- (20 points) When more than one rule can apply, select a rule at random.
- (30 points) The original ELIZA had a "memory" mechanism. When no pattern matched the input, it said "Tell me more about X", where X was some topic that the user mentioned earlier in the dialogue; i.e., X was something that appeared in an input that the user typed in previously. Add such a history mechanism to your program.
- (20 points extra credit) Implement some interesting additional feature that makes your Eliza an improvement over the online Eliza
Using the FSA's you've just designed, write a program that puts XML-like tags around time and date specifications. For example:
INPUT: a text in English.
OUTPUT: the same text with all date and time expressions marked by <TIME> and </TIME> (for both dates and times).
SAMPLE INPUT: Christmas is celebrated on the 25th of December.
SAMPLE OUTPUT: <TIME> Christmas </TIME> is celebrated on <TIME> the 25th of December </TIME>.
SCOPE: At a minimum, your program should be able to process all time and date expressions in the following files:
as well as all time and date expressions listed in exercises 2.4 - 2.6. in J&M, page 54.