get_std_syllable now works
[vspell.git] / libvspell / syllable.h
blob07e7c1f1739a8d2a7ea735c73c86325306a8da29
1 #ifndef __SYLLABLE_H__ // -*- tab-width: 2 mode: c++ -*-
2 #define __SYLLABLE_H__
4 #ifndef __DICTIONARY_H__
5 #include "dictionary.h"
6 #endif
8 #ifndef __VECTOR__
9 #include <vector>
10 #endif
12 class Syllable {
13 public:
14 enum diacritics {
15 None = 0,
16 Acute,
17 Grave,
18 Hook,
19 Tilde,
20 Dot
22 enum {
23 First_Consonant,
24 Padding_Vowel,
25 Vowel,
26 Last_Consonant,
27 Diacritic
30 int components[5];
31 // int first_consonant;
32 // int padding_vowel;
33 // int vowel;
34 // int last_consonant;
35 // diacritics diacritic;
37 Syllable(const char* _first_consonant = NULL,
38 const char* _padding_vowel = NULL,
39 const char* _vowel = NULL,
40 const char* _last_consonant = NULL,
41 int diacritic = -1);
44 bool match(const Syllable &sample);
45 void apply(const Syllable &sample,std::vector<Syllable> &output);
46 bool parse(const char *str);
47 void standardize(std::string str);
48 void print();
49 strid to_id();
50 std::string to_str();
53 extern char *vowels[];
54 extern char *first_consonants[];
55 extern char *last_consonants[];
56 extern char *padding_vowels[];
57 std::string get_std_syllable(const std::string &str);
58 std::string get_lowercased_syllable(const std::string &str);
60 #endif