问题描述
如何使用Java将单词添加到狮身人面像?我是一个学习狮身人面像的新学习者,我只知道如何使用它.我想学习添加我的文字.任何人都可以帮助我.
How to add my words to sphinx using java?Iam a new learner for learning sphinx,I just know how to use it.I want to learn adding my words.anybody can help me.
推荐答案
将单词添加到字典文件sphinx4/models/acoustic/wsj/dict/cmudict.0.6d:
Add the word to the dictionary file sphinx4/models/acoustic/wsj/dict/cmudict.0.6d:
ABACO AE B AH K OW
ABACO AE B AH K OW
ABACUS AE B AH K AH S
ABACUS AE B AH K AH S
PINTREST P IH N T R EH S T
然后将单词添加到语法中sphinx4/src/apps/edu/cmu/sphinx/demo/helloworld/hello.gram:
Then add the word to the grammar sphinx4/src/apps/edu/cmu/sphinx/demo/helloworld/hello.gram:
语法你好;
public =(早上好|您好)(Bhiksha | Evandro | Paul | 菲利普|丽塔|会| Pintrest );
public = (Good morning | Hello) ( Bhiksha | Evandro | Paul | Philip | Rita | Will | Pintrest );
重新编译并运行HelloWorld演示,它将了解一个新词.
Recompile and run HelloWorld demo, it will understand a new word.
如果单词已经在字典中,则可以将其添加到语法中.
If the word is already in the dictionary, you can just add it to the grammar.
这篇关于如何在狮身人面像中添加单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!