%
1. Design
For grammar1, since it’s very simple, I just implemented the entire programming based on the given grammar rules and vocabulary.
By carefully comparing grammar1 and grammar2, we can see that grammar2 is a simplified version of grammar1 in terms of grammar rules, which means we need to find the difference between them to make each vocabulary bring its own features. The main difference lies in the singular and plural forms of nouns and the singular and plural forms of verbs as well as proper nouns. I carefully designed the features and finally realized the function.
2. Limitation
Since the grammar rules of grammar1 and grammar2 are very simple, there are bound to be many restrictions, for example it can’t parse different tense “Fido fed the dog with Weetabix”.
3. Test strategy
I test these sentence to make the grammar work normally.
1). “fido feeds the dog with Weetabix”. Of course, this is the given sentence and it must be parse correctly.
2). “fido feeds the dog with Weetabix with biscuits”. Testing this sentence is to make sure PP P NP and NPpl Npl PP work well.
3). “biscuits feed the dog with Weetabix”. Though this sentence makes no sense, I just to confirm subject-verb agreement (S NPsg VPsg and S NPpl VPpl).