For this question, you should list the inferences that most people
would make while reading the following story: "John got up one morning and discovered his power was out. Unable
to shave, he called his next door neighbor and asked if he could come
over to borrow the bathroom. But everyone on the street was out.
So John drove to work hoping no one would see him before he found a
bathroom with hot water. Unfortunately, he ran into his boss on the elevator.
He half-expected to find a pink slip in his mailbox the next day."
Using the FSA's you've just designed, write a program in a language of your choice 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. Christmas Eve is celebrated the night before.
SAMPLE OUTPUT: <TIME> Christmas </TIME> is celebrated on <TIME> the 25th of December </TIME>. <TIME> Christmas Eve </TIME> is celebrated <TIME> the night before </TIME> .
SUBMIT: (documented) source code; output of your program on some training files; and a README file listing all time and date expressions that your program can handle, and instructions about how to run your program.
GRADING: Your program will be run on a unseen test file to evaluate its generality and correctness.
CLARIFICATION (added September 9): For parts a-c, please use the graphical FSA representation. For part d, if you need to convert to regular expressions or FSA tables, please be sure to include these versions explicitly in your code or README.
CLARIFICATION (added September 12): I/O elaboration.