27 enum ReplaceType {REPL_UP, REPL_DOWN, REPL_RIGHT, REPL_LEFT};
36 enum ReplaceArrow { E_REPLACE_RIGHT,
37 E_OPTIONAL_REPLACE_RIGHT,
39 E_OPTIONAL_REPLACE_LEFT,
40 E_REPLACE_RIGHT_MARKUP,
68 ReplaceType get_replType()
const;
98 float zero_weight(
float f);
119 ReplaceType replType,
234 HfstTransducer replace(
const std::vector<Rule> &ruleVector,
bool optional);
238 HfstTransducer replace_left(
const std::vector<Rule> &ruleVector,
bool optional);
242 HfstTransducer replace_leftmost_longest_match(
const std::vector<Rule> &ruleVector );
247 HfstTransducer replace_rightmost_longest_match(
const std::vector<Rule> &ruleVector );
251 HfstTransducer replace_leftmost_shortest_match(
const std::vector<Rule> &ruleVector );
253 HfstTransducer replace_rightmost_shortest_match(
const std::vector<Rule> &ruleVector );
272 HfstTransducer replace_epenthesis(
const std::vector<Rule> &ruleVector,
bool optional);
HfstTransducer expandContextsWithMapping(const HfstTransducerPairVector &ContextVector, const HfstTransducer &mappingWithBracketsAndTmpBoundary, const HfstTransducer &identityExpanded, ReplaceType replType, bool optional)
It is used in bracketedReplace, when the replace expression has context. Cr' = (Rc ...
Definition: HfstXeroxRules.cc:259
std::pair< String, String > StringPair
A symbol pair in a transition.
Definition: HfstSymbolDefs.h:71
Declarations of HFST API functions and datatypes.
Mark up rule has two markers on the right side of the mapping. Mapping is only left side of the mappi...
Definition: HfstXeroxRules.h:75
HfstTransducer removeMarkers(const HfstTransducer &tr)
Remove makers used in replace functions from a tr.
Definition: HfstXeroxRules.cc:133
HfstTransducer parallelBracketedReplace(const std::vector< Rule > &ruleVector, bool optional)
Bracketed replace for parallel rules.
Definition: HfstXeroxRules.cc:747
A synchronous finite-state transducer.
Definition: HfstTransducer.h:227
HfstTransducer applyBoundaryMark(const HfstTransducer &t)
It applies boundary marker from contexts (.#.) to t.
Definition: HfstXeroxRules.cc:2081
ImplementationType
The type of an HfstTransducer.
Definition: HfstDataTypes.h:43
std::vector< HfstTransducer > HfstTransducerVector
a vector of transducers for methods applying a cascade of automata
Definition: HfstDataTypes.h:35
A rule that contains mapping and context and replace type (if any). If rule is A -> B || L _ R ...
Definition: HfstXeroxRules.h:51
void insertFreelyAllTheBrackets(HfstTransducer &t, bool optional)
If optional is false, the function freely inserts in t @ and If it is true, it also inserts @ and ...
Definition: HfstXeroxRules.cc:227
std::pair< HfstTransducer, HfstTransducer > HfstTransducerPair
A pair of transducers.
Definition: HfstDataTypes.h:79
std::vector< HfstTransducerPair > HfstTransducerPairVector
A vector of transducer pairs.
Definition: HfstDataTypes.h:83
HfstTransducer constraintComposition(const HfstTransducer &t, const HfstTransducer &Constraint)
Generalized Lenient Composition (by Anssi Yli-Jyr�) of a t and a Constraint. More about this composit...
Definition: HfstXeroxRules.cc:196
HfstTransducer bracketedReplace(const Rule &rule, bool optional)
Unconditional replace, in multiple contexts first: (.* T<a:b>T .*) - [( .* L1 T<a:b>T R1 ...
Definition: HfstXeroxRules.cc:447