diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-09 23:30:14 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-09 23:30:14 -0500 |
| commit | 41decb9a671e4d0fbbe12533372435ec6ede2246 (patch) | |
| tree | 35cd3c7bc9ba623a62aefc7492ed6a5fd157e40d /verbly/verb.h | |
| parent | 4d8fd1c470c5f2c190f082683321b40a566cf1c9 (diff) | |
| download | furries-41decb9a671e4d0fbbe12533372435ec6ede2246.tar.gz furries-41decb9a671e4d0fbbe12533372435ec6ede2246.tar.bz2 furries-41decb9a671e4d0fbbe12533372435ec6ede2246.zip | |
Started verbly rewrite
verbly is intended to be a general use natural language generation library. Here, I'm using it to simply generate random verbs or adjectives. A schema for the sqlite database is provided, and for testing I manually added data. A generator program is being written that will generate a database from WordNet, VerbNet, PropBank, and AGID data.
Diffstat (limited to 'verbly/verb.h')
| -rw-r--r-- | verbly/verb.h | 67 |
1 files changed, 67 insertions, 0 deletions
| diff --git a/verbly/verb.h b/verbly/verb.h new file mode 100644 index 0000000..42c8dc2 --- /dev/null +++ b/verbly/verb.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | #ifndef VERB_H_BCC929AD | ||
| 2 | #define VERB_H_BCC929AD | ||
| 3 | |||
| 4 | #include <vector> | ||
| 5 | |||
| 6 | namespace verbly { | ||
| 7 | |||
| 8 | /*class frame_part { | ||
| 9 | |||
| 10 | }; | ||
| 11 | |||
| 12 | class frame { | ||
| 13 | private: | ||
| 14 | std::list<frame_part> content; | ||
| 15 | std::map<std::string, std::vector<std::list<frame_part>::iterator>> predicates; | ||
| 16 | |||
| 17 | public: | ||
| 18 | frame(std::list<frame_part> content) : content(content) | ||
| 19 | { | ||
| 20 | |||
| 21 | } | ||
| 22 | |||
| 23 | std::unique_ptr<token> make_utterance() const | ||
| 24 | { | ||
| 25 | |||
| 26 | } | ||
| 27 | };*/ | ||
| 28 | |||
| 29 | enum class conjugation { | ||
| 30 | present_participle, | ||
| 31 | past_participle, | ||
| 32 | infinitive | ||
| 33 | }; | ||
| 34 | |||
| 35 | class verb { | ||
| 36 | private: | ||
| 37 | int id; | ||
| 38 | |||
| 39 | public: | ||
| 40 | verb(int id) : id(id) | ||
| 41 | { | ||
| 42 | |||
| 43 | } | ||
| 44 | |||
| 45 | std::string infinitive; | ||
| 46 | std::string past_tense; | ||
| 47 | std::string past_participle; | ||
| 48 | std::string ing_form; | ||
| 49 | std::string s_form; | ||
| 50 | //std::vector<frame> frames; | ||
| 51 | |||
| 52 | std::string conjugate(conjugation infl) const | ||
| 53 | { | ||
| 54 | switch (infl) | ||
| 55 | { | ||
| 56 | case conjugation::infinitive: return infinitive; | ||
| 57 | case conjugation::past_participle: return past_participle; | ||
| 58 | case conjugation::present_participle: return ing_form; | ||
| 59 | } | ||
| 60 | } | ||
| 61 | }; | ||
| 62 | |||
| 63 | }; | ||
| 64 | |||
| 65 | #include "token.h" | ||
| 66 | |||
| 67 | #endif /* end of include guard: VERB_H_BCC929AD */ | ||
