estelendur d4be579a9f Initial commit 9 년 전
..
._README.txt d4be579a9f Initial commit 9 년 전
._grammar.txt d4be579a9f Initial commit 9 년 전
._transcript.txt d4be579a9f Initial commit 9 년 전
._wk3.pl d4be579a9f Initial commit 9 년 전
README.txt d4be579a9f Initial commit 9 년 전
grammar.txt d4be579a9f Initial commit 9 년 전
transcript.txt d4be579a9f Initial commit 9 년 전
wk3.pl d4be579a9f Initial commit 9 년 전
writeup.pdf d4be579a9f Initial commit 9 년 전

README.txt

Esty (Katherine) Thomas
Module 2: Logic/Prolog
Week 3/4

FILES:
wk3.pl: This contains all my code! Grammar, lexicon, and translation rules.
transcript: This is a transcript of me running each sentence required for the assignment (plus a couple extra) through the parser or translator (the initial sentences go through the parser, and the sentences required to be translated go through the translator).
grammar: This is a summary of my working grammar, with semantic features, and includes my lexicon.
README: This file!
writeup.pdf: The writeup for the assignment. Includes the grammar, lexicon, and transcript.

HOW TO COMPILE:
Go into Prolog and tell it consult(wk3). Clauses-not-together errors will show up.

HOW TO USE:
Each sentence needs to be entered manually, unfortunately. To convert "All boys run!" to logic, enter this: prlogic([all,boys,run], L). (or any other variable in place of L). The variable will be unified with the logical statement corresponding to the sentence.
To test the validity of a sentence, e.g., "Girls like boys who run", enter this: sentence(T, [girls,like,boys,who,run], []). (or any other variable in place of T). The variable will be unified with the parse tree of the sentence.
Sentences containing words that are not in the lexicon cannot, obviously, be processed.

KNOWN ISSUES:
Plural nouns and singular verbs are not stripped of their final 's' to be put into the parse tree, so the logical statements and parse trees read a little oddly.
Only sentences that use only the determiners 'all' and 'some' will be translated.