diff options
Diffstat (limited to 'lib/word.h')
| -rw-r--r-- | lib/word.h | 19 |
1 files changed, 10 insertions, 9 deletions
| diff --git a/lib/word.h b/lib/word.h index 864cee1..a16319d 100644 --- a/lib/word.h +++ b/lib/word.h | |||
| @@ -6,8 +6,8 @@ | |||
| 6 | #include "field.h" | 6 | #include "field.h" |
| 7 | #include "filter.h" | 7 | #include "filter.h" |
| 8 | #include "notion.h" | 8 | #include "notion.h" |
| 9 | #include "lemma.h" | ||
| 10 | #include "frame.h" | 9 | #include "frame.h" |
| 10 | #include "form.h" | ||
| 11 | 11 | ||
| 12 | struct sqlite3_stmt; | 12 | struct sqlite3_stmt; |
| 13 | 13 | ||
| @@ -95,17 +95,17 @@ namespace verbly { | |||
| 95 | 95 | ||
| 96 | const notion& getNotion() const; | 96 | const notion& getNotion() const; |
| 97 | 97 | ||
| 98 | const lemma& getLemma() const; | ||
| 99 | |||
| 100 | bool hasFrames() const; | 98 | bool hasFrames() const; |
| 101 | 99 | ||
| 102 | const std::vector<frame>& getFrames() const; | 100 | const std::vector<frame>& getFrames() const; |
| 103 | 101 | ||
| 104 | // Convenience accessors | 102 | const form& getBaseForm() const; |
| 103 | |||
| 104 | bool hasInflection(inflection category) const; | ||
| 105 | |||
| 106 | const std::vector<form>& getInflections(inflection category) const; | ||
| 105 | 107 | ||
| 106 | std::string getBaseForm() const; | ||
| 107 | 108 | ||
| 108 | std::vector<std::string> getInflections(inflection infl) const; | ||
| 109 | 109 | ||
| 110 | // Type info | 110 | // Type info |
| 111 | 111 | ||
| @@ -127,9 +127,10 @@ namespace verbly { | |||
| 127 | // Relationships with other objects | 127 | // Relationships with other objects |
| 128 | 128 | ||
| 129 | static const field notions; | 129 | static const field notions; |
| 130 | static const field lemmas; | ||
| 131 | static const field frames; | 130 | static const field frames; |
| 132 | 131 | ||
| 132 | static field forms(inflection category); | ||
| 133 | |||
| 133 | // Relationships with self | 134 | // Relationships with self |
| 134 | 135 | ||
| 135 | static const field antonyms; | 136 | static const field antonyms; |
| @@ -154,6 +155,7 @@ namespace verbly { | |||
| 154 | 155 | ||
| 155 | private: | 156 | private: |
| 156 | 157 | ||
| 158 | void initializeForm(inflection category) const; | ||
| 157 | void initializeFrames() const; | 159 | void initializeFrames() const; |
| 158 | 160 | ||
| 159 | bool valid_ = false; | 161 | bool valid_ = false; |
| @@ -170,10 +172,9 @@ namespace verbly { | |||
| 170 | const database* db_; | 172 | const database* db_; |
| 171 | 173 | ||
| 172 | mutable notion notion_; | 174 | mutable notion notion_; |
| 173 | mutable lemma lemma_; | ||
| 174 | |||
| 175 | mutable bool initializedFrames_ = false; | 175 | mutable bool initializedFrames_ = false; |
| 176 | mutable std::vector<frame> frames_; | 176 | mutable std::vector<frame> frames_; |
| 177 | mutable std::map<inflection, std::vector<form>> forms_; | ||
| 177 | 178 | ||
| 178 | }; | 179 | }; |
| 179 | 180 | ||
