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

The stream does not contain transducers. More...

Inheritance diagram for NotTransducerStreamException:
HfstException

Additional Inherited Members

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

Detailed Description

The stream does not contain transducers.

Thrown by hfst.HfstTransducer hfst.HfstInputStream.__init__

An example.

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

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