Ling 472 Project 1 Due 1:30pm on Wednesday, April 10, 2013
Ling 472 Project 1 Due 1:30pm on Wednesday, April 10, 2013
Ling 472 Project 1 Due 1:30pm on Wednesday, April 10, 2013
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<str<strong>on</strong>g>Ling</str<strong>on</strong>g> <str<strong>on</strong>g>472</str<strong>on</strong>g> <str<strong>on</strong>g>Project</str<strong>on</strong>g> 1<br />
<str<strong>on</strong>g>Due</str<strong>on</strong>g> 1:<str<strong>on</strong>g>30pm</str<strong>on</strong>g> <strong>on</strong> <strong>Wednesday</strong>, <strong>April</strong> <strong>10</strong>, <strong>2013</strong><br />
For this project you will create a program similar to ‘ELIZA’ (Weizenbaum 1966), which is described in<br />
Chapter 2 of the Jurafsky and Martin textbook (p.25-26). This crude method of simulating c<strong>on</strong>versati<strong>on</strong><br />
uses a sequence of pattern replacements to transform each input string into an output.<br />
A skelet<strong>on</strong> Pyth<strong>on</strong> script is provided, which you should develop further.<br />
http://courses.washingt<strong>on</strong>.edu/ling<str<strong>on</strong>g>472</str<strong>on</strong>g>/elizalike.py<br />
You can run the skelet<strong>on</strong> program in Pyth<strong>on</strong>, as-is, to see how it handles the sentences at the top of page<br />
26. Instructi<strong>on</strong>s <strong>on</strong> using Pyth<strong>on</strong> can be found here:<br />
http://depts.washingt<strong>on</strong>.edu/uwcl/twiki/bin/view.cgi/Main/UsingPyth<strong>on</strong><br />
The basic approach is to read in a string of input from the user, modifying it successively (sometimes<br />
subtly, sometimes drastically, depending <strong>on</strong> the input string), and print out the result. To maintain the<br />
illusi<strong>on</strong> of AI, it is crucial that Elizalike print out grammatical strings. (You may assume that it is given<br />
grammatical input.) Furthermore, Elizalike should be able to handle pers<strong>on</strong> deixis, referring to itself in the<br />
first pers<strong>on</strong> and to the user in the sec<strong>on</strong>d pers<strong>on</strong>.<br />
Input<br />
Develop a list of sentences that you will use to test your program to make sure it handles the pers<strong>on</strong> deixis<br />
correctly. This list must illustrate all ways in which 1st and 2nd pers<strong>on</strong> are marked in English. To be<br />
clear, this means that you must include all 1st and 2nd pers<strong>on</strong> pr<strong>on</strong>ouns, all 1st and 2nd pers<strong>on</strong> subjectverb<br />
pairs with the verb be and all possible forms of the verb.<br />
This file should be a plaintext file, with <strong>on</strong>e sentence per line, so that it can be fed into the pyth<strong>on</strong><br />
program using c<strong>on</strong>sole redirecti<strong>on</strong>:<br />
$ pyth<strong>on</strong> elizalike.py
Discussi<strong>on</strong><br />
An important part of every project will be your write up. With all projects this will include problems you<br />
came across and how (or if) you were able to solve them, any insights, special features, and what you<br />
learned. For this project, please also include a special discussi<strong>on</strong> of why English morphology and syntax<br />
make this program relatively straightforward, and how it would be more complicated in another language.<br />
Give examples if possible.<br />
Submissi<strong>on</strong><br />
sentences.txt A list of test sentences which your system handles correctly, <strong>on</strong>e per line<br />
elizalike.py Your extended versi<strong>on</strong> of the Eliza-like therapist program<br />
output captured c<strong>on</strong>sole output (stdout) from running your program, this should be<br />
produced by:<br />
$ pyth<strong>on</strong> elizalike.py output<br />
readme.{pdf, txt} Your write-up of the project, including your discussi<strong>on</strong> of whether English<br />
morphology and syntax make this type of program easier or harder than other<br />
languages. Describe your approach, any problems or special features, or<br />
anything else you’d like us to review. If you could not complete some or all of<br />
the project’s goals, please explain what you were able to complete.<br />
Gather together all the required files, making sure that, for example, any PDF or other binary files are<br />
transferred from your local machine using a binary transmissi<strong>on</strong> format. Then, from within the directory<br />
c<strong>on</strong>taining your files, issue the following command to package your files for submissi<strong>on</strong>. Replace the<br />
bracketed porti<strong>on</strong> with your UW NetID.<br />
tar ‐czf [your‐uw‐netid].tar.gz .<br />
Notice that this command packages all files in the current directory; do not include any top-level<br />
directories. Upload the file to CollectIt.<br />
Grading<br />
Correct results 30<br />
Follow submitting instructi<strong>on</strong>s <strong>10</strong><br />
Clarity, elegance, and readability of code 25<br />
Write-up 35