HFST - Helsinki Finite-State Transducer Technology - Python API  version 3.12.1
 All Classes Namespaces Files Functions Variables Pages
List of all members
TransducerTypeMismatchException Class Reference

Two or more transducers do not have the same type. More...

Inheritance diagram for TransducerTypeMismatchException:
HfstException

Additional Inherited Members

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

Detailed Description

Two or more transducers do not have the same type.

This can happen if (1) the calling and called transducer in a binary operation, (2) two transducers in a pair of transducers, (3) two consecutive transducers coming from an HfstInputStream or (4) two transducers in a function taking two or more transducers as arguments do not have the same type.

An example:

 hfst.set_default_fst_type(hfst.types.TROPICAL_OPENFST_TYPE)
 tr1 = hfst.regex('foo')
 tr2 = hfst.regex('bar')
 tr2.convert(hfst.types.FOMA_TYPE)
 try:
     tr1.disjunct(tr2)
 except hfst.exceptions.TransducerTypeMismatchException:
     print('The implementation types of transducers must be the same.')

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