HFST - Helsinki Finite-State Transducer Technology - Python API  version 3.12.3 (under development)
List of all members
StateIsNotFinalException Class Reference

State is not final (and cannot have a final weight). More...

Inheritance diagram for StateIsNotFinalException:
HfstException

Additional Inherited Members

- Public Member Functions inherited from HfstException
def what ()
 A message describing the error in more detail. More...
 

Detailed Description

State is not final (and cannot have a final weight).

An example :

 tr = hfst.HfstBasicTransducer()
 tr.add_state(1)
 # An exception is thrown as state number 1 is not final
 try:
     w = tr.get_final_weight(1)
 except hfst.exceptions.StateIsNotFinalException:
     print("State is not final.")

You should use function hfst.HfstBasicTransducer.is_final_state if you are not sure whether a state is final.

Thrown by hfst.HfstBasicTransducer get_final_weight.


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