Hi,
I am trying to build a dynamic grammar as described here:
and in simple_demo.sh
I created a small test.
The main grammar is is:
0 1 Hallo Hallo 1.69314694
1 2 or or 1.38629401
1 2 and and 1.38629401
1
2 3 again again
3 4 dear dear
3 5 #nonterm:Dlist <eps>
4 5 Mike Mike
5
The dynamic one is:
0 1 #nonterm_begin <eps>
1 2 <eps> <eps> 5
1 2 Carlos Carlos 1.60943794
1 2 Josef Josef 1.60943794
1 2 Sam Sam 1.60943794
1 2 John John 1.60943794
1 2 Wei Wei 1.60943794
2 3 #nonterm_end <eps>
3
prepare_lang.pl was used to prepare the language data with nonterminal symbols:
tail phones.txt
}:_E 682
}:_I 683
}:_S 684
#0 685
#1 686
#nonterm_bos 687
#nonterm_begin 688
#nonterm_end 689
#nonterm_reenter 690
#nonterm:Dlist 691
tail words.txt
or 10
and 11
again 12
NOISE 13
#0 14
<s> 15
</s> 16
#nonterm_begin 17
#nonterm_end 18
#nonterm:Dlist 19
In the final step - after compilation of the grammars - when I run make-grammar-fst, I am getting an error:
/opt/kaldi/bin/make-grammar-fst --write-as-grammar=true --nonterm-phones-offset=687 MainC.fst 691 DynC.fst aaa.fst
ERROR (make-grammar-fst[5.5]:InitEntryOrReentryArcs():decoder/grammar-fst.cc:143) There is something wrong with the graph; did you forget to add #nonterm_begin and #nonterm_end to the non-top-level FSTs before compiling?
But I did not forget. i did check also LG.fst of the non-top-level fst and I see the symbols there.
Am I missing something?
Thanks for any hint.
Josef