@@ -632,6 +632,14 @@ message Section {
632
632
}
633
633
634
634
635
+ // Allows for multiple graphs on top of the same words
636
+ // This is especially useful for Semgrex and Ssurgeon
637
+ // on UD datasets with basic & enhanced dependencies
638
+ message RepeatedDependencies {
639
+ repeated Token token = 1 ;
640
+ repeated DependencyGraph graph = 2 ;
641
+ }
642
+
635
643
636
644
// A message for requesting a semgrex
637
645
// Each sentence stores information about the tokens making up the
@@ -657,6 +665,12 @@ message SemgrexRequest {
657
665
// You may want to send multiple semgrexes per query because
658
666
// translating large numbers of dependency graphs to protobufs
659
667
// will be expensive, so doing several queries at once will save time
668
+ //
669
+ // TODO: searching over multiple layers of dependencies of the same
670
+ // sentence will not work unless we change the semantics of the
671
+ // return values. In particular, the root of the match
672
+ // and the matchIndex of a NamedNode both are indices of the words,
673
+ // whereas the words could be "empty" words or copy words
660
674
message SemgrexResponse {
661
675
message NamedNode {
662
676
required string name = 1 ;
@@ -728,12 +742,14 @@ message SsurgeonRequest {
728
742
729
743
repeated Ssurgeon ssurgeon = 1 ;
730
744
repeated DependencyGraph graph = 2 ;
745
+ repeated RepeatedDependencies multigraph = 3 ;
731
746
}
732
747
733
748
message SsurgeonResponse {
734
749
message SsurgeonResult {
735
750
optional DependencyGraph graph = 1 ;
736
751
optional bool changed = 2 ;
752
+ optional RepeatedDependencies multigraph = 3 ;
737
753
}
738
754
739
755
repeated SsurgeonResult result = 1 ;
0 commit comments