quick_lm.pl - will compile a sentence file into an lm for use with pocketpshinx.

mklm        - this wraps quick_lm.pl and builds the dictionary for the lm.
Makefile.gram - is installed ito prefix/grammar so you can just put your sentence files in the grammar directory and type make.

The sentence file format is:

<s> YES </s>
<s> NO </s>

Save this in yesno.sent and place in grammar directory.

cd grammar
make

To wipe out all the grammars type 

make clean.


Please test and report any issues.  This should allow you to build lm's with ease.






git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9067 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West
2008-07-17 04:21:28 +00:00
parent 76d581387b
commit bcb7bc63aa
4 changed files with 374 additions and 1 deletions
+9 -1
View File
@@ -47,4 +47,12 @@ $(DESTDIR)$(PREFIX)/grammar/model/communicator:
mkdir -p $(DESTDIR)$(PREFIX)/grammar/model/communicator
mv $(BASE)/libs/Communicator_semi_40.cd_semi_6000/* $(DESTDIR)$(PREFIX)/grammar/model/communicator
local_install: $(DESTDIR)$(PREFIX)/grammar/model $(DESTDIR)$(PREFIX)/grammar/model/communicator
grammar_maker:
@cp -f $(BASE)/scripts/mklm $(DESTDIR)$(PREFIX)/bin/mklm
@cp -f $(BASE)/scripts/quick_lm.pl $(DESTDIR)$(PREFIX)/bin/quick_lm.pl
@chmod 755 $(DESTDIR)$(PREFIX)/bin/mklm
@chmod 755 $(DESTDIR)$(PREFIX)/bin/quick_lm.pl
@cp -f $(BASE)/scripts/Makefile.gram $(DESTDIR)$(PREFIX)/grammar/Makefile
@cp -f $(POCKETSPHINX_DIR)/model/lm/cmudict.0.6d $(DESTDIR)$(PREFIX)/conf/cmudict.0.6d
local_install: $(DESTDIR)$(PREFIX)/grammar/model $(DESTDIR)$(PREFIX)/grammar/model/communicator grammar_maker