diff options
Diffstat (limited to 'lib/word.cpp')
-rw-r--r-- | lib/word.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/word.cpp b/lib/word.cpp index c50e7d3..156e7e0 100644 --- a/lib/word.cpp +++ b/lib/word.cpp | |||
@@ -1,4 +1,5 @@ | |||
1 | #include "verbly.h" | 1 | #include "verbly.h" |
2 | #include <algorithm> | ||
2 | 3 | ||
3 | namespace verbly { | 4 | namespace verbly { |
4 | 5 | ||
@@ -29,4 +30,11 @@ namespace verbly { | |||
29 | return result; | 30 | return result; |
30 | } | 31 | } |
31 | 32 | ||
33 | bool word::starts_with_vowel_sound() const | ||
34 | { | ||
35 | return std::any_of(std::begin(pronunciations), std::end(pronunciations), [] (std::list<std::string> phonemes) { | ||
36 | return (phonemes.front().find_first_of("012") != std::string::npos); | ||
37 | }); | ||
38 | } | ||
39 | |||
32 | }; | 40 | }; |