Skip to content

Commit

Permalink
Start to build a test
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Feb 27, 2025
1 parent 3063b26 commit 7bb9a99
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/src/edu/stanford/nlp/semgraph/semgrex/SemgrexTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import edu.stanford.nlp.stats.IntCounter;
import edu.stanford.nlp.trees.UniversalEnglishGrammaticalRelations;
import edu.stanford.nlp.trees.Tree;
import edu.stanford.nlp.trees.ud.CoNLLUFeatures;
import edu.stanford.nlp.semgraph.SemanticGraph;
import edu.stanford.nlp.semgraph.SemanticGraphEdge;
import edu.stanford.nlp.semgraph.SemanticGraphFactory;
Expand Down Expand Up @@ -235,6 +236,15 @@ public void testBrokenContainsExpression() {
public void testContainsExpression() {
// morphofeatures is a Map, so this should work
SemgrexPattern pattern = SemgrexPattern.compile("{morphofeatures@foo=bar}");
SemanticGraph graph = makeComplicatedGraph();
Set<IndexedWord> vertices = graph.vertexSet();
for (IndexedWord iw : vertices) {
if (iw.value().equals("D") || iw.value().equals("F")) {
CoNLLUFeatures feats = new CoNLLUFeatures();
feats.put("foo", "bar");
}
}
//outputResults(pattern, graph);
}

public void testReferencedRegex() {
Expand Down

0 comments on commit 7bb9a99

Please sign in to comment.