File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
test/src/edu/stanford/nlp/semgraph/semgrex Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1111import edu .stanford .nlp .stats .IntCounter ;
1212import edu .stanford .nlp .trees .UniversalEnglishGrammaticalRelations ;
1313import edu .stanford .nlp .trees .Tree ;
14+ import edu .stanford .nlp .trees .ud .CoNLLUFeatures ;
1415import edu .stanford .nlp .semgraph .SemanticGraph ;
1516import edu .stanford .nlp .semgraph .SemanticGraphEdge ;
1617import edu .stanford .nlp .semgraph .SemanticGraphFactory ;
@@ -235,6 +236,15 @@ public void testBrokenContainsExpression() {
235236 public void testContainsExpression () {
236237 // morphofeatures is a Map, so this should work
237238 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);
238248 }
239249
240250 public void testReferencedRegex () {
You can’t perform that action at this time.
0 commit comments