summary refs log tree commit diff stats
path: root/lib/word.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-05-02 22:45:11 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-05-02 22:45:11 -0400
commitbd398509575af0362e53ce6b805eaa210406b9fd (patch)
treee699624ca6934f591241d5dfa95a91b839ce6bc7 /lib/word.h
parent499dbc410174602a5985bd75b600fbec5cd086f1 (diff)
parent965a3206df834f846f2c560438c80a707dcee4cb (diff)
downloadverbly-bd398509575af0362e53ce6b805eaa210406b9fd.tar.gz
verbly-bd398509575af0362e53ce6b805eaa210406b9fd.tar.bz2
verbly-bd398509575af0362e53ce6b805eaa210406b9fd.zip
Merge branch 'master' of https://github.com/hatkirby/verbly
Diffstat (limited to 'lib/word.h')
-rw-r--r--lib/word.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/word.h b/lib/word.h index dc6fac8..08797a3 100644 --- a/lib/word.h +++ b/lib/word.h
@@ -3,6 +3,20 @@
3 3
4namespace verbly { 4namespace verbly {
5 5
6 class rhyme {
7 public:
8 rhyme(std::string prerhyme, std::string phonemes);
9
10 std::string get_prerhyme() const;
11 std::string get_rhyme() const;
12
13 bool operator==(const rhyme& other) const;
14
15 private:
16 std::string _prerhyme;
17 std::string _rhyme;
18 };
19
6 class word { 20 class word {
7 protected: 21 protected:
8 const data* _data; 22 const data* _data;
@@ -10,6 +24,7 @@ namespace verbly {
10 bool _valid = false; 24 bool _valid = false;
11 25
12 std::list<std::list<std::string>> pronunciations; 26 std::list<std::list<std::string>> pronunciations;
27 std::list<rhyme> rhymes;
13 28
14 word(); 29 word();
15 word(const data& _data, int _id); 30 word(const data& _data, int _id);
@@ -24,7 +39,7 @@ namespace verbly {
24 public: 39 public:
25 virtual std::string base_form() const = 0; 40 virtual std::string base_form() const = 0;
26 41
27 std::list<std::string> rhyme_phonemes() const; 42 std::list<rhyme> get_rhymes() const;
28 bool starts_with_vowel_sound() const; 43 bool starts_with_vowel_sound() const;
29 }; 44 };
30 45