File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
src/edu/stanford/nlp/semgraph/semgrex Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 5353 * The special case of an empty text can be tested for with an empty regex.
5454 * For example, words marked with {@code SpaceAfter=no} will have a blank {@code after} attribute.
5555 * {@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.
5666 * <h3>Relations</h3>
5767 *
5868 * Relations are defined by a symbol representing the type of relationship and a
Original file line number Diff line number Diff line change 140140 * {@code -updateMorphoFeatures ...} will edit or add the features without overwriting existing features.
141141 * TODO: if anyone needs the ability to remove features without resetting the entire features map,
142142 * please file an issue on github.
143+ * {@code -remove ...} will remove the attribute entirely, such as doing {@code -remove lemma} to remove the lemma.
143144 *</p><p>
144145 * {@code lemmatize} will put a lemma on a word.
145146 * {@code -node} is the node to edit.
You can’t perform that action at this time.
0 commit comments