1 #ifndef _LOOKUP_FLAG_DIACRITICS_H_
2 #define _LOOKUP_FLAG_DIACRITICS_H_
13 enum DiacriticOperator
15 Pop, Nop, Dop, Rop, Cop, Uop
18 typedef std::map<std::string,DiacriticOperator> DiacriticOperators;
19 typedef std::map<std::string,std::string> DiacriticFeatures;
20 typedef std::map<std::string,std::string> DiacriticValues;
21 typedef std::map<std::string,bool> DiacriticSettingMap;
22 typedef std::map<std::string,std::string> FeatureValues;
23 typedef std::map<std::string,bool> FeaturePolarities;
25 class FlagDiacriticTable
27 static DiacriticOperators diacritic_operators;
28 static DiacriticFeatures diacritic_features;
29 static DiacriticValues diacritic_values;
30 FeatureValues feature_values;
31 FeaturePolarities feature_polarities;
32 static DiacriticSettingMap diacritic_has_value;
34 static bool is_genuine_diacritic(
const std::string &diacritic_string);
35 static void split_diacritic(
const std::string &diacritic_string);
36 void set_positive_value(std::string &feature,
38 void set_negative_value(std::string &feature,
40 void disallow(std::string &feature,
42 void disallow(std::string &feature);
43 void require(std::string &feature,
45 void require(std::string &feature);
46 void unify(std::string &feature,
48 void clear(std::string &feature);
51 FlagDiacriticTable(
void);
55 void insert_symbol(
const std::string &symbol);
58 static bool is_diacritic(
const std::string &symbol);
59 bool is_valid_string(
const StringVector & input_string);
60 StringVector filter_diacritics(
const StringVector & input_string);
62 static void display(
short diacritic);
std::vector< std::string > StringVector
A vector of strings.
Definition: HfstDataTypes.h:88