HFST - Helsinki Finite-State Transducer Technology - Python API
version 3.12.1
|
Transducer is cyclic. More...
Additional Inherited Members | |
Public Member Functions inherited from HfstException | |
def | what |
A message describing the error in more detail. More... | |
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)