diff options
Diffstat (limited to 'lib/part.h')
-rw-r--r-- | lib/part.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/part.h b/lib/part.h index 7180f57..450db3d 100644 --- a/lib/part.h +++ b/lib/part.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <vector> | 5 | #include <vector> |
6 | #include <set> | 6 | #include <set> |
7 | #include <list> | 7 | #include <list> |
8 | #include "selrestr.h" | ||
9 | #include "field.h" | 8 | #include "field.h" |
10 | #include "filter.h" | 9 | #include "filter.h" |
11 | #include "enums.h" | 10 | #include "enums.h" |
@@ -21,7 +20,7 @@ namespace verbly { | |||
21 | 20 | ||
22 | // Static factories | 21 | // Static factories |
23 | 22 | ||
24 | static part createNounPhrase(std::string role, selrestr selrestrs, std::set<std::string> synrestrs); | 23 | static part createNounPhrase(std::string role, std::set<std::string> selrestrs, std::set<std::string> synrestrs); |
25 | 24 | ||
26 | static part createVerb(); | 25 | static part createVerb(); |
27 | 26 | ||
@@ -77,7 +76,7 @@ namespace verbly { | |||
77 | 76 | ||
78 | std::string getNounRole() const; | 77 | std::string getNounRole() const; |
79 | 78 | ||
80 | selrestr getNounSelrestrs() const; | 79 | std::set<std::string> getNounSelrestrs() const; |
81 | 80 | ||
82 | std::set<std::string> getNounSynrestrs() const; | 81 | std::set<std::string> getNounSynrestrs() const; |
83 | 82 | ||
@@ -110,8 +109,21 @@ namespace verbly { | |||
110 | 109 | ||
111 | static const field frames; | 110 | static const field frames; |
112 | 111 | ||
113 | // Noun synrestr relationship | 112 | // Noun selrestr and synrestr relationships |
114 | 113 | ||
114 | class selrestr_field { | ||
115 | public: | ||
116 | |||
117 | filter operator%=(std::string selrestr) const; | ||
118 | |||
119 | private: | ||
120 | |||
121 | static const field selrestrJoin; | ||
122 | static const field selrestrField; | ||
123 | }; | ||
124 | |||
125 | static const selrestr_field selrestrs; | ||
126 | |||
115 | class synrestr_field { | 127 | class synrestr_field { |
116 | public: | 128 | public: |
117 | 129 | ||
@@ -138,7 +150,7 @@ namespace verbly { | |||
138 | union { | 150 | union { |
139 | struct { | 151 | struct { |
140 | std::string role; | 152 | std::string role; |
141 | selrestr selrestrs; | 153 | std::set<std::string> selrestrs; |
142 | std::set<std::string> synrestrs; | 154 | std::set<std::string> synrestrs; |
143 | } noun_phrase_; | 155 | } noun_phrase_; |
144 | struct { | 156 | struct { |