📄 content.txt
字号:
</PRE><!-- widthincm : 14 --><P>Variations over this exist:</P><PRE class="code">SELECT ALL OBJECTSIN MyMonadSetWHERE// Query here, will only find objects// in the stored monad set "MyMonadSet"SELECT ALL OBJECTSIN {PREOPENBRACE}1-23400{PRECLOSEBRACE}WHERE// Query here, will only find objects// within the monads {PREOPENBRACE}1-23400{PRECLOSEBRACE}.</PRE><!-- widthincm : 14 --><h2>Overview</h2><UL> <LI><A HREF="#Basics">The basics</A> <LI><A HREF="#FeatureRestrictions">Feature-restrictions</A> <LI><A HREF="#FirstLast">First/last</A> <LI><A HREF="#ObjectReferences">Object references</A> <LI><A HREF="#NOTEXISTKleeneStar">NOTEXIST and Kleene Star</A></UL><h2><A NAME="Basics">The basics</A></h2><P><strong>Object blocks, Sequence, Embedding</strong></P><table border="1"> <!-- columns : 3 --><tr> <th>Construction</th> <th>Meaning</th> <th>Example</th></tr><tr> <td><PRE class="MQLExample">[ObjectType]</PRE></td> <td>Objects:<br>Finds object of type ObjectType</td> <td><PRE class="MQLExample">[Word]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A][B]</PRE></td> <td>Adjacency:<br>Finds objects of type A that are adjacent to objects of type B. However, if there is a gap in the context, that gap will be ignored and objects on either side of the gap will be "adjacent"</td> <td><PRE class="MQLExample">[Word][Phrase]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A]![B]</PRE></td> <td>Strict adjacency:<br>Finds objects of type A that are _really_ adjacent to objects of type B. No gaps allowed.</td> <td><PRE class="MQLExample">[Word]![Word]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A [B]]</PRE></td> <td>Embedding:<br>Finds objects of type A inside which there is an embedded object of type B.</td> <td><PRE class="MQLExample">[Phrase [Word]]</PRE></td></tr></table><P><strong>Arbitrary space</strong></P><table border="1"> <!-- columns : 3 --><tr> <th>Construction</th> <th>Meaning</th> <th>Example</th></tr><tr> <td><PRE class="MQLExample">[A [B] .. [C]]</PRE></td> <td>Arbitrary space:<br>Finds objects of type A, inside of which ther are two objects, one of type B and one of type C, and they need not be adjacent (though they can be).</td> <td><PRE class="MQLExample">[Clause [Phrase] .. [Phrase]]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A [B] .. {PRELT}= 5 [C]]</PRE></td> <td>Arbitrary space with restriction:<br>Finds objects of type A, inside of which ther are two objects, one of type B and one of type C, and they need not be adjacent (though they can be), and there may be up to 5 monads between them.</td> <td><PRE class="MQLExample">[Clause [Phrase] .. {PRELT}= 20 [Phrase]]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A [B] .. {PRELT} 6 [C]]</PRE></td> <td>Arbitrary space with restriction:<br>Finds objects of type A, inside of which ther are two objects, one of type B and one of type C, and they need not be adjacent (though they can be), and there may be up to 5 monads between them.</td> <td><PRE class="MQLExample">[Clause [Phrase] .. {PRELT} 21 [Phrase]]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A [B] .. BETWEEN 3 AND 6 [C]]</PRE></td> <td>Arbitrary space with restriction:<br>Finds objects of type A, inside of which ther are two objects, one of type B and one of type C, and they need not be adjacent (though they can be), and there must be at least 3 and at most 6 monads between them.</td> <td><PRE class="MQLExample">[Clause [Word] .. BETWEEN 2 AND 5 [Word]]</PRE></td></tr></table><h2><A NAME="FeatureRestrictions">Feature-restrictions</A></h2><P><strong>Basic feature-restrictions</strong></P><table border="1"> <!-- columns : 3 --><tr> <th>Construction</th> <th>Meaning</th> <th>Example</th></tr><tr> <td><PRE class="MQLExample">[A myfeature = val]</PRE></td> <td>Feature-equality: A's feature "myfeature" must have value "val".<br>Other comparison-operators include:<UL> <LI>"<>": inequality (different from) <LI>"<": less than <LI>">": greather than <LI>"<=": less than or equal to <LI>">=": greater than or equal to</UL></td> <td><PRE class="MQLExample">[Word lemma="see"]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A myfeature IN (value-list)]</PRE></td> <td>Value-list:<br>A.myfeature must be an enumeration, and value-list must be a comma-separated list of enumeration constants in parentheses. The meaning is as if an OR had been placed between individual equality (=) comparisons between the feature and the members of the list.</td> <td><PRE class="MQLExample">[Word pos IN (article,noun, conjunction, adjective)]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A myfeature ~ "regex"]</PRE></td> <td>Regular expression:<br>A.myfeature is matched via the regular expression "regex". The regular expressions are compatible with Perl 5. Can only be used with string-features.</td> <td><PRE class="MQLExample">[Word lemma ~ "A(b{PREPIPE}a{PREPIPE}e)*"]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A myfeature !~ "regex"]</PRE></td> <td>Negated regular expression: Matches those objects for which the feature in question does NOT match the regular expression. Can only be used with string-features.</td> <td><PRE class="MQLExample">[Word surface !~ "se(a{PREPIPE}e)"]</PRE></td></tr></table><P><strong>Boolean combinations of feature-restrictions</strong></P><table border="1"> <!-- columns : 3 --><tr> <td><PRE class="MQLExample">[A feature1 = value1 AND feature2 = value2]</PRE></td> <td>Conjunction:<br>Both feature-comparisons must be true at the same time for the object to match.</td> <td><PRE class="MQLExample">[Word lemma="see" AND tense=past]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A feature1 = value1 OR feature2 = value2]</PRE></td> <td>Disjunction:<br>If either of the feature-comparisons evaluates to true, then the object matches.</td> <td><PRE class="MQLExample">[Phrase phrase{PREUNDERSCORE}type = NP OR phrase{PREUNDERSCORE}type=PP]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A NOT feature1 = value1]</PRE></td> <td>Negation:<br>The feature-comparison must not be true.</td> <td><PRE class="MQLExample">[Word NOT pos=verb]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A (feature1 = value1 OR feature2 = value2) AND feature3 = value3)</PRE></td> <td>Grouping:<br>Parentheses can be used to group feature-comparisons.</td> <td><PRE class="MQLExample">[Phrase phrase{PREUNDERSCORE}type = VP AND (function = Predicate OR function = PredCmpl)]</PRE></td></tr></table><h2><A NAME="FirstLast">First/last</A></h2><P>An object can be first, last, or first and last in its context.</P><table border="1"> <!-- columns : 3 --><tr> <th>Construction</th> <th>Meaning</th> <th>Example</th></tr><tr> <td><PRE class="MQLExample">[B [A first]]</PRE></td> <td>The A object must be first in the context of the B object.</td> <td><PRE class="MQLExample">[Phrase [Word first] [Word]]</PRE></td></tr><tr> <td><PRE class="MQLExample">[B [A last]]</PRE></td> <td>The A object must be last in the context of the B object.</td> <td><PRE class="MQLExample">[Phrase [Word] .. [Word last]]</PRE></td></tr> <tr> <td><PRE class="MQLExample">[B [A first and last]]</PRE></td> <td>The A object must be both first and last in the context of the B object.</td> <td><PRE class="MQLExample">[Phrase [Word first and last]]</PRE></td></tr></table><h2><A NAME="ObjectReferences">Object references</A></h2><P>You can give an object a name with the "AS" keyword and then referto that object later in the query with the "dot notation".</P><table border="1"> <!-- columns : 3 --><tr> <th>Construction</th> <th>Meaning</th> <th>Example</th></tr><tr> <td><PRE class="MQLExample">[A AS a1 [B feature{PREUNDERSCORE}on{PREUNDERSCORE}B = a1.feature{PREUNDERSCORE}on{PREUNDERSCORE}A]]</PRE></td> <td>B's feature_on_B feature must be the same as the feature_on_A feature on the A object.</td> <td><PRE class="MQLExample">[Phrase AS p1 // The phrase must // be the immediate // ancestor of the // word [Word parent = p1.self]]</PRE></td></tr></table><h2><A NAME="NOTEXISTKleeneStar">NOTEXIST and Kleene Star</A></h2><P>The NOTEXIST keyword tells that an object must not exist at a givenpoint.</P><P>The Kleene-Star tells that an object must occur either 0, 1, ormore times.</P><P>The Kleene-Star with a set of integers tucked behind tells theexact number of times the object may occur.</P><P>Currently, the Kleene Star cannot be used on the first object in acontext, or the first object after a "..".</P><table border="1"> <!-- columns : 3 --><tr> <th>Construction</th> <th>Meaning</th> <th>Example</th></tr><tr> <td><PRE class="MQLExample">[A NOTEXIST [B]]</PRE></td> <td>There must not exist a B inside of A.</td> <td><PRE class="MQLExample">[Sentence NOTEXIST [Word surface="saw"]]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A [B] [C]*]</PRE></td> <td>Inside of A, there must be a B, followed by zero or more C's.</td> <td><PRE class="MQLExample">[Phrase [Word first pos=preposition] [Word pos IN (article,noun, conjunction)]*]</PRE></td></tr><tr> <td><PRE class="MQLExample">[A [B] [C]*{PREOPENBRACE}0,1{PRECLOSEBRACE}]</PRE></td> <td>Inside of A, there must occur a B object, followed by either 0 or 1 C objects. Note how this makes the C object optional.</td> <td><PRE class="MQLExample">[Clause [word pos="conjunction"] [word pos="conjunction" ]*{PREOPENBRACE}0,1{PRECLOSEBRACE}]</PRE></td></tr></table></page>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -