<< Prev | - Up - | Next >> |
Declaration of grammar rules for discourse.
To finish off, we'll extend our grammar with some rules for discourse:
d2(D2)--> d1(D1), {combine(d2:D2,[d1:D1])}.
d1(D1)--> s2(S2), {combine(d1:D1,[s2:S2])}.
d1(D1)--> s2(S2), d1(D2), {combine(d1:D1,[s2:S2,conj,d1:D2])}.
d1(D1)--> s2(S2), {lexicon(coord,_,Word,Type)}, Word, d1(D2), {combine(d1:D1,[s2:S2,Type,d1:D2])}.
The first four rules allow us to make small discourses by sequencing sentences (we have introduced a new category D for `discourse'). The second set of rules cover basic sentences and conditionals.
<< Prev | - Up - | Next >> |