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