Due: THURSDAY!! Mar 4th, 2010 at 11:59PM
1. Objectives and Overview
For this assignment you are asked to write a context free grammar with semantic attachments.
2. Reference files
The input file for this assignment is:
- sentences: a text file with 25 English sentences
3. Detailed instructions
Task 0:
Review the lectures and readings concerning lambda calculus.
Task 1:
For the sentences input file, create a feature grammar called grammar.fcfg that includes semantic attachments. The grammar should look like this sample. While not required, you may use the event-style semantics discussed in class.
Task 2:
Using the nltk.parse.FeatureEarleyChartParse class (which ends up calling LogicParser), create a file called semantic_parser.py that reads in sentences and outputs a file called formulas containing the semantic representations for each input sentence. The output file should contain 25 lines with one fol formula per line.
NOTE: if you get an ambiguous sentence, then just print one semantic representation. Print a blank line if your parser finds no parse for a given sentence.
4. Running your code
Your code should run on Patas without error. And in order for us to run your assignment in a semi-automated fashion, please include a single shell script file called, e.g., hw6.cmd. We will run your homework on Patas using the following command:
$ condor_submit hw6.cmd
Once we untar your assignment (see below), this shell script should be in the top level of whatever directory structure you’re using.
Within your hw6.cmd file write your .out, .log, .error, etc, files to the top-level directory where the hw6.cmd file is. The script should call all necessary code. This way, you can use whatever language you like and whatever directory structure makes sense to you. Please refer to the detailed explanation of each assignment for what kinds of output files to produce, and what kinds of supplementary files are required. See the CLMA wiki pages for help on this.
5. How to turn in your work
Turn in your assignment using CollectIt. Please TAR your files and name the tar’d file with the extension .tar. Please don’t use ZIP, tar.gz, gzip, rar, etc.
Use the filename of whatever homework we’re on, e.g. for homework 6 name your file hw6.tar. Yes you will all have the same filename for your homeworks, but this doesn’t matter because of the way that CollectIt handles things.
To tar (available on Patas) from the directory that your work is in:
$ tar -cvf hw6.tar *
6. Assessment
This homework is worth 15% of your total grade. Assessment criteria are explained here.