13 #ifndef _SYMBOL_DEFS_H_
14 #define _SYMBOL_DEFS_H_
26 #define INTERNAL_EPSILON "@_EPSILON_SYMBOL_@"
27 #define INTERNAL_UNKNOWN "@_UNKNOWN_SYMBOL_@"
28 #define INTERNAL_IDENTITY "@_IDENTITY_SYMBOL_@"
29 #define INTERNAL_DEFAULT "@_DEFAULT_SYMBOL_@"
63 typedef std::set<String> StringSet;
101 const std::string internal_epsilon =
"@_EPSILON_SYMBOL_@";
102 const std::string internal_unknown =
"@_UNKNOWN_SYMBOL_@";
103 const std::string internal_identity =
"@_IDENTITY_SYMBOL_@";
104 const std::string internal_default =
"@_DEFAULT_SYMBOL_@";
107 bool is_epsilon(std::string
const & str);
108 bool is_unknown(std::string
const & str);
109 bool is_identity(std::string
const & str);
110 bool is_default(std::string
const & str);
111 bool is_epsilon(
const char * str);
112 bool is_unknown(
const char * str);
113 bool is_identity(
const char * str);
114 bool is_default(
const char * str);
117 typedef std::pair<unsigned int, unsigned int> NumberPair;
118 typedef std::vector<NumberPair> NumberPairVector;
119 typedef std::set<NumberPair> NumberPairSet;
120 typedef std::map<String,unsigned int> StringNumberMap;
121 typedef std::map<unsigned int,unsigned int> NumberNumberMap;
124 void collect_unknown_sets(StringSet &s1, StringSet &unknown1,
125 StringSet &s2, StringSet &unknown2);
129 std::string to_string(
const StringVector & sv,
bool spaces=
false);
std::pair< String, String > StringPair
A symbol pair in a transition.
Definition: HfstSymbolDefs.h:71
std::string String
A UTF-8 symbol in a transition.
Definition: HfstSymbolDefs.h:60
std::vector< std::pair< std::string, std::string > > StringPairVector
A vector of string pairs.
Definition: HfstDataTypes.h:106
std::set< HfstTwoLevelPath > HfstTwoLevelPaths
A set of two-level weighted paths.
Definition: HfstDataTypes.h:110
std::set< StringPair > StringPairSet
A set of symbol pairs used in substituting symbol pairs and in rule functions.
Definition: HfstSymbolDefs.h:83
std::map< String, String > HfstSymbolSubstitutions
A map of substitutions used when performing multiple symbol-to-symbol substitutions.
Definition: HfstSymbolDefs.h:89
std::pair< float, StringPairVector > HfstTwoLevelPath
A path of two level of arcs with collected weight.
Definition: HfstDataTypes.h:108
std::map< StringPair, StringPair > HfstSymbolPairSubstitutions
A map of substitutions used when performing multiple symbol pair-to-symbol pair substitutions.
Definition: HfstSymbolDefs.h:95
std::vector< std::string > StringVector
A vector of strings.
Definition: HfstDataTypes.h:88