File: fsg_test.py

package info (click to toggle)
pocketsphinx 0.8%2B5prealpha-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 46,276 kB
  • ctags: 2,161
  • sloc: ansic: 22,812; sh: 11,451; python: 599; makefile: 393; perl: 301
file content (13 lines) | stat: -rw-r--r-- 258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/python

import sys

from sphinxbase.sphinxbase import LogMath
from sphinxbase.sphinxbase import FsgModel

lmath = LogMath()
fsg = FsgModel("simple_grammar", lmath, 1.0, 10)
fsg.word_add("hello")
fsg.word_add("world")
print (fsg.word_id("world"))