I have made a few changes to the language system from last week. The new version can be found in the same place the old version was.
~tvandrun/Public/cs394/language3.sml
The new version allows for noun phrases to be modified with prepositional phrases, for example, "The tree of the field seemed important."
The first thing you should do is merge this with what you did last week.
Now, here are the changes you should make to this:
makePlural()
that
takes a sentence and converts it to a string
except that the subject is made plural and
the verb is inflected to be present tense and to agree with the plural subject.
printWithPossessives()
that takes a sentence and converts it to a string
except that all cases where a noun phrase is modified
by a prepositional phrase beginning with of,
we instead make the object of that preposition
to be a possessive noun modifying the main noun phrase.
For example, "A big tree of the field" becomes
"the field's big tree".
Notice that the article of the enclosing noun phrase is not printed.