HFST - Helsinki Finite-State Transducer Technology - Python API  version 3.9.0
NotTransducerStreamException Class Reference

The stream does not contain transducers. More...

Inheritance diagram for NotTransducerStreamException:
HfstException

Detailed Description

The stream does not contain transducers.

Thrown by libhfst.HfstTransducer libhfst.HfstInputStream.__init__

An example.

 f = open('foofile', 'w')
 f.write('This is an ordinary text file.\n')
 f.close()
 try:
     instr = libhfst.HfstInputStream('foofile')
     tr = instr.read()
     print(tr)
     instr.close()
 except libhfst.NotTransducerStreamException:
     print("Could not print transducer: the file does not contain binary transducers.")

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