Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 633 Bytes

convert-transducer.rst

File metadata and controls

24 lines (18 loc) · 633 Bytes

Convert transducers

This section demonstrates how to convert a transducer from `k2`_ to `OpenFst`_.

k2-transducer.svg

A transducer in `k2`_.

openfst-transducer.svg

The above transducer converted to `OpenFst`_. Pay attention to the negative sign for numbers on the arcs.

.. literalinclude:: ./code/convert-transducer.py
   :language: python
   :linenos:
   :caption: Convert a transducer from `k2`_ to `OpenFst`_