File tree 2 files changed +11
-0
lines changed
src/edu/stanford/nlp/semgraph/semgrex
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 53
53
* The special case of an empty text can be tested for with an empty regex.
54
54
* For example, words marked with {@code SpaceAfter=no} will have a blank {@code after} attribute.
55
55
* {@code {after://}} will search for this.
56
+ * <br>
57
+ * It is now also possible to negate individual attributes in Semgrex with {@code !:}
58
+ * For example, this expression will search for a NOUN which is not "boy":
59
+ * {@code {lemma!:boy;pos:NOUN}}
60
+ * <br>
61
+ * Attributes which are maps, in particular the morphological
62
+ * features, can be searched by writing a map, such as
63
+ * {@code {morphofeatures:{Tense:Past;Person!:3}}}
64
+ * This expression will
65
+ * search for words which are past tense but are not in 3rd person.
56
66
* <h3>Relations</h3>
57
67
*
58
68
* Relations are defined by a symbol representing the type of relationship and a
Original file line number Diff line number Diff line change 140
140
* {@code -updateMorphoFeatures ...} will edit or add the features without overwriting existing features.
141
141
* TODO: if anyone needs the ability to remove features without resetting the entire features map,
142
142
* please file an issue on github.
143
+ * {@code -remove ...} will remove the attribute entirely, such as doing {@code -remove lemma} to remove the lemma.
143
144
*</p><p>
144
145
* {@code lemmatize} will put a lemma on a word.
145
146
* {@code -node} is the node to edit.
You can’t perform that action at this time.
0 commit comments