File tree 1 file changed +10
-0
lines changed
test/src/edu/stanford/nlp/semgraph/semgrex
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11
11
import edu .stanford .nlp .stats .IntCounter ;
12
12
import edu .stanford .nlp .trees .UniversalEnglishGrammaticalRelations ;
13
13
import edu .stanford .nlp .trees .Tree ;
14
+ import edu .stanford .nlp .trees .ud .CoNLLUFeatures ;
14
15
import edu .stanford .nlp .semgraph .SemanticGraph ;
15
16
import edu .stanford .nlp .semgraph .SemanticGraphEdge ;
16
17
import edu .stanford .nlp .semgraph .SemanticGraphFactory ;
@@ -235,6 +236,15 @@ public void testBrokenContainsExpression() {
235
236
public void testContainsExpression () {
236
237
// morphofeatures is a Map, so this should work
237
238
SemgrexPattern pattern = SemgrexPattern .compile ("{morphofeatures@foo=bar}" );
239
+ SemanticGraph graph = makeComplicatedGraph ();
240
+ Set <IndexedWord > vertices = graph .vertexSet ();
241
+ for (IndexedWord iw : vertices ) {
242
+ if (iw .value ().equals ("D" ) || iw .value ().equals ("F" )) {
243
+ CoNLLUFeatures feats = new CoNLLUFeatures ();
244
+ feats .put ("foo" , "bar" );
245
+ }
246
+ }
247
+ //outputResults(pattern, graph);
238
248
}
239
249
240
250
public void testReferencedRegex () {
You can’t perform that action at this time.
0 commit comments