HFST - Helsinki Finite-State Transducer Technology - Python API  version 3.12.0
 All Classes Namespaces Files Functions Variables Pages
Classes | Functions
hfst.xerox_rules Namespace Reference

Xerox-type replace rules. More...

Classes

class  ReplaceType
 Type of Xerox-type replace rules. More...
 
class  Rule
 A rule that contains mapping and context and replace type (if any). More...
 

Functions

def after
 todo More...
 
def before
 todo More...
 
def replace
 replace up, left, right, down More...
 
def replace_epenthesis
 replace up, left, right, down More...
 
def replace_left
 replace up, left, right, down More...
 
def replace_leftmost_longest_match
 left to right More...
 
def replace_leftmost_shortest_match
 todo More...
 
def replace_rightmost_longest_match
 right to left More...
 
def replace_rightmost_shortest_match
 todo More...
 
def restriction
 Restriction function "=>". More...
 

Detailed Description

Xerox-type replace rules.

Function Documentation

def hfst.xerox_rules.after (   left,
  right 
)

todo

Parameters
left(HfstTransducer)
right(HfstTransducer)
def hfst.xerox_rules.before (   left,
  right 
)

todo

Parameters
left(HfstTransducer)
right(HfstTransducer)
def hfst.xerox_rules.replace (   rule,
  optional 
)

replace up, left, right, down

Parameters
rule(Rule, HfstRuleVector)
optional(Bool)
def hfst.xerox_rules.replace_epenthesis (   rule,
  optional 
)

replace up, left, right, down

Parameters
rule(Rule, HfstRuleVector)
optional(Bool)
def hfst.xerox_rules.replace_left (   rule,
  optional 
)

replace up, left, right, down

Parameters
rule(Rule, HfstRuleVector)
optional(Bool)
def hfst.xerox_rules.replace_leftmost_longest_match (   rule)

left to right

Parameters
rule(Rule, HfstRuleVector)
def hfst.xerox_rules.replace_leftmost_shortest_match (   rule)

todo

Parameters
rule(Rule, HfstRuleVector)
def hfst.xerox_rules.replace_rightmost_longest_match (   rule)

right to left

Parameters
rule(Rule, HfstRuleVector)
def hfst.xerox_rules.replace_rightmost_shortest_match (   rule)

todo

Parameters
rule(Rule, HfstRuleVector)
def hfst.xerox_rules.restriction (   automaton,
  context 
)

Restriction function "=>".

Parameters
automaton(HfstTransducer)
context(HfstTransducerPairVector)