Skip to content

Commit

Permalink
fix example code in README.md (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Dec 25, 2022
1 parent 9b3e42f commit 0d9f7a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ which can be visualized in [k2][3] using
```python
import k2
G = k2.Fsa.from_openfst(G_fst_txt, acceptor=False)
with open('G_fst.txt') as f:
G = k2.Fsa.from_openfst(f.read(), acceptor=False)
G.labels_sym = k2.SymbolTable.from_file('words.txt')
G.aux_labels_sym = k2.SymbolTable.from_file('words.txt')
#G.labels[G.labels >= 3] = 0 # convert symbols with ID >= ID of #0 to eps
Expand Down

0 comments on commit 0d9f7a1

Please sign in to comment.