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

Transducer is cyclic. More...

Inheritance diagram for TransducerIsCyclicException:
HfstException

Additional Inherited Members

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

Detailed Description

Transducer is cyclic.

Thrown by hfst.HfstTransducer.extract_paths. An example

 transducer = hfst.regex('[a:b]*')
 try:
     results = transducer.extract_paths(output='text')
     print("The transducer has %i paths:" % len(results))
     print(results)
 except hfst.exceptions.TransducerIsCyclicException:
     print("The transducer is cyclic and has an infinite number of paths. Some of them:")
     results = transducer.extract_paths(output='text', max_cycles=5)
     print(results)

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