Patterns with boolean operators

It is possible to define more complex patterns using boolean operators: |means disjunction (OR), and & means conjunction (AND). Operator | can be used for tags, for features, and for values of features. However, for practical reasons, operator & is only used for features. It cannot be used for feature values because, by definition, two different values of a feature are mutually exclusive. In addition, patterns are not required to use it since they alredy presuppose the meaning of tag conjunction. Let's see some examples:

ADV<lemma:very|quite|rather> ADV|ADJ

PRO<lemma:that&type:Q> VERB

VERB<(mode:S)|(tense:P)> NOUN

The first pattern introduces two “|” operators. The first one represents a disjunction among three possible values (“very”, “quite”, and “more”) of the feature “lemma”. The second one is an operator on tags: it allows to choose between either an adverb or an adjective. The second pattern introduces the &ldquo&” operator between two features that must be filled simultaneously: to be a relative pronoun (R), and to be lexicalized by means of “that”. Finally, in the third pattern, there is a disjunction between two different verbal features. Let's note that disjunctions on features by means of the operator | requires the use of brackets: “(feature1:value1)|(feature2:value2)”.

The number of arguments of both | and & is unlimited. When combining the two operators (only with features), & must be always within the scope of |. Below, we show some well formed expressions in DepPattern:

Tag1<(feature1:value1)|(feature2:value2&feature3:value3)>

Tag1<(feature1:value1&feature2:value2)|(feature3:value3)>

Let $a$, $b$, and $c$ be 3 features. All possible combination of these 3 features with the 2 boolean operators are represented as follows:

DepPattern representation Standard bracketed representation
$(a)\vert(b\&c)$ $(a\vert(b\&c))$
$(a\&b)\vert(c)$ $((a\&b)\vert c)$
$(a\&c)\vert(b\&c)$ $((a\vert b)\&c)$
$(a\&b)\vert(a\&c)$ $(a\&(b\vert c))$


The first column shows well-formed DepGrammar expressions while the second one depicts the corresponding expressions using a more compact representation. In the standard representation, brackets are used to delimit the scope of the operator. DepPattern representation is not so compact but is easy to read.