HW-2
Computer Science
Theory of Computing (Csc 520 Course)
1.(12.5points).
Construct a chart parse using CFG G, given below, for this ambiguous sentence:
refuse discount hardship
0 1 2 3
Note that in G, an S can simply be a VP, as in the imperative English sentences look before you leap or live for today.
For full credit, your chart parse should capture all three of these
Meanings:
As a VP that is a complete S, refuse discount hardship could mean do not stint on the suffering.
refuse as an N could mean unwanted people, as in the Emma Lazarus Statue of Liberty poem:
Give me your tired, your poor,
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore.
With that sense of refuse, refuse discount hardship could mean that those whom Liberty gathers downplay their difficulties.
refuse as a noun could also mean objects people throw away. So, as an NP, not in itself an S,
refuse discount hardship could mean something like a difficulty caused by a lack of coupons
at thrift stores.
Include all entries, even if they are not continued on subsequent rows, as well as all complete
parses for S that do not consume the entire input string.
G = {
S ? NP VP | VP
NP ? N | AttrNP
AttrNP ? NP N
VP ? V | VP NP
N ? discounts | hardship | refuse
V ? discount | refuse |
}
Remember that
AttrNP stands for attribute noun phrase, where one noun modifies another
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more