HFST - Helsinki Finite-State Transducer Technology - Python API  version 3.12.3 (under development)
Public Member Functions | List of all members
HfstBasicTransition Class Reference

A transition class that consists of a target state, input and output symbols and a a tropical weight. More...

Public Member Functions

def __init__ (self, state, input, output, weight)
 Create an HfstBasicTransition leading to target state state with input symbol input, output symbol output and weight weight. More...
 
def get_input_symbol (self)
 Get the input symbol of the transition. More...
 
def get_output_symbol (self)
 Get the output symbol of the transition. More...
 
def get_target_state (self)
 Get number of the target state of the transition. More...
 
def get_weight (self)
 Get the weight of the transition. More...
 
def set_weight (self, weight)
 Set the weight of the transition to weight. More...
 

Detailed Description

A transition class that consists of a target state, input and output symbols and a a tropical weight.

See also
hfst.HfstBasicTransducer

Constructor & Destructor Documentation

def __init__ (   self,
  state,
  input,
  output,
  weight 
)

Create an HfstBasicTransition leading to target state state with input symbol input, output symbol output and weight weight.

Parameters
stateNumber of the target state.
inputThe input string.
outputThe output string.
weightThe weight.
Exceptions
EmptyStringException
 transition = hfst.HfstBasicTransition(1, 'foo', 'bar', 0.5)

Member Function Documentation

def get_input_symbol (   self)

Get the input symbol of the transition.

def get_output_symbol (   self)

Get the output symbol of the transition.

def get_target_state (   self)

Get number of the target state of the transition.

def get_weight (   self)

Get the weight of the transition.

def set_weight (   self,
  weight 
)

Set the weight of the transition to weight.

Parameters
weightThe weight.

The documentation for this class was generated from the following file: