Grammar Engineering Frequently Asked Questions

How do I do disjunction (constrain the value of a feature to be X or Y)?

The tdl formalism doesn't provide an explicit disjunction operator. In most cases, disjunction can be handled straightforwardly through the logic of the type hierarchy. For example, if you want to constrain the value of CASE to be either nom or acc (but not dat), it suffices to define a type which subsumes both nom and acc, but not dat:

case := top.
dat := case.
nom+acc := case.
nom := nom+acc.
acc := nom+acc.

Given this hierarchy, "The case is nominative or accusative"(equivalently, "The case is not dative") can be expressed thus:

[ CASE nom+acc ].

Note that a type can have multiple supertypes. This allows for overlapping disjunctive types. In this hierarchy, the types nom+acc and nom+dat subsume nom and acc and nom and dat, respectively.

case := top.
nom+acc := case.
nom+dat := case.
nom := nom+acc & nom+dat.
acc := nom+acc.
dat := nom+dat.

Related topics

Back to FAQs page

Back to main course page

-- EmilyBender - 02 Nov 2004

Topic revision: r1 - 2004-11-03 - 06:05:48 - TWikiGuest

This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Privacy Statement Terms & Conditions