Showing characters instead of integers in arcs in OpenFST(PyFST)
<p>I'm using the method <code>linear_chain</code> to accept a <code>String</code>. When I convert it into a <code>fst binary</code> to then into a <code>DOT</code> format, I get integers instead of the characters. Also, I have a SymbolTable for each of the corresponding letters being read.</p>

<p>What I need is to show the characters instead, be by the command line or by coding directly in Python. Any help or reference would be greatly appreciated.</p>

<p>To do this on the command line, make sure you provide both an input and output symbol table.  The command should be something like</p>

<pre><code>fstdraw --isymbols=input_syms.txt --osymbols=output_syms.txt fst.bin
</code></pre>

<p>I haven't used "PyFST", but I would suggest you use the Python bindings that are included in OpenFst 1.5.1 and later.  The Python support has been getting better in versions 1.5.x, so it's best to use 1.5.3 or later.</p>

<p>If using the OpenFST provided Python bindings, make sure you set the symbol tables before attempting to draw.</p>

<pre><code>fst.input_symbols = your_symbol_table
fst.output_symbols = your_symbol_table
fst.draw("fst.dot")
</code></pre>

<p>There is more documentation for these Python bindings available here: <a href="http://www.openfst.org/twiki/bin/view/FST/PythonExtension" rel="nofollow">http://www.openfst.org/twiki/bin/view/FST/PythonExtension</a></p>

<p>If that doesn't help, could you post some example code please?</p>

python openfst