HFST - Helsinki Finite-State Transducer Technology - Python API
version 3.10.0
|
The stream does not contain transducers. More...
Additional Inherited Members | |
Public Member Functions inherited from HfstException | |
def | what |
A message describing the error in more detail. More... | |
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.")