10 #ifndef _LOOKUP_FLAG_DIACRITICS_H_
11 #define _LOOKUP_FLAG_DIACRITICS_H_
22 enum DiacriticOperator
24 Pop, Nop, Dop, Rop, Cop, Uop
27 typedef std::map<std::string,DiacriticOperator> DiacriticOperators;
28 typedef std::map<std::string,std::string> DiacriticFeatures;
29 typedef std::map<std::string,std::string> DiacriticValues;
30 typedef std::map<std::string,bool> DiacriticSettingMap;
31 typedef std::map<std::string,std::string> FeatureValues;
32 typedef std::map<std::string,bool> FeaturePolarities;
34 class FlagDiacriticTable
36 static DiacriticOperators diacritic_operators;
37 static DiacriticFeatures diacritic_features;
38 static DiacriticValues diacritic_values;
39 FeatureValues feature_values;
40 FeaturePolarities feature_polarities;
41 static DiacriticSettingMap diacritic_has_value;
43 static bool is_genuine_diacritic(
const std::string &diacritic_string);
44 static void split_diacritic(
const std::string &diacritic_string);
45 void set_positive_value(std::string &feature,
47 void set_negative_value(std::string &feature,
49 void disallow(std::string &feature,
51 void disallow(std::string &feature);
52 void require(std::string &feature,
54 void require(std::string &feature);
55 void unify(std::string &feature,
57 void clear(std::string &feature);
60 FlagDiacriticTable(
void);
64 void insert_symbol(
const std::string &symbol);
67 static bool is_diacritic(
const std::string &symbol);
68 bool is_valid_string(
const StringVector & input_string);
69 StringVector filter_diacritics(
const StringVector & input_string);
71 static void display(
short diacritic);
std::vector< std::string > StringVector
A vector of strings.
Definition: HfstDataTypes.h:87