sphinx 4 AbstractDecoder
来源:互联网 发布:c语言技术 编辑:程序博客网 时间:2024/05/22 22:19
public abstract class AbstractDecoderimplements ResultProducer, Configurable
一个抽象的解码器,此解码器实现了独立于被使用的(pull/push)的解码框架的全部方法的实现。
本类的属性:
@S4Component(type =SearchManager.class)
public final static String PROP_SEARCH_MANAGER =“searchManager”;
protectedSearchManager searchManager;定义了被使用的搜索管理的名字。
@S4ComponentList(type =ResultListener.class)
public static final String PROP_RESULT_LISTENERS =“resultListeners”;
protected finalList<ResultListener> resultListeners =newArrayList<ResultListener>();存储结果监听器的列表。
@S4Boolean(defaultValue= false)
public static final String AUTO_ALLOCATE =“autoAllocate”;如果此属性设置为true,则被使用的搜索管理将会自动的在newProperties()中分配所需的资源即allocated。
@S4Boolean(defaultValue= false)
public static final String FIRE_NON_FINAL_RESULTS =“fireNonFinalResults”;
private boolean fireNonFinalResults;如果设置为false,被使用的搜索管理的所有的注册的结果监听器仅在最终结果时才会被通知。每一个默认的非最终结果不会触发通知,因为在大多数的应用程序中utterance的最终结果是足够的。
private String name;此对象名字。
protected Logger logger;
本类的构造方法:
public AbstractDecoder()空的构造方法。
PublicAbstractDecoder(SearchManagersearchManager,boolean fireNonFinalResults,boolean autoAllocate,List<ResultListener>resultListeners);给定参数创建对象。
本类的方法:
public abstract Result decode(String referenceText);解码帧,直到识别完成为止。输入为参考文本或null,返回的是一个result。
public void newProperties(PropertySheetps) ;对属性进行设置。
private void init(String name, Loggerlogger, SearchManager searchManager,boolean fireNonFinalResults,boolean autoAllocate, List<ResultListener> listeners);给定参数来初始化属性。
public void allocate();为解码分配必须的资源。调用的是搜索管理的此方法。
public void deallocate();释放相应的资源。调用的搜索管理的此方法。
public voidaddResultListener(ResultListener resultListener);添加一个结果监听器到此识别器。无论何时当一个新的结果被识别器产生时,一个结果监听器被调用。此方法能够在任何状态被调用。输入为:要添加的结果监听器。即为往监听器列表添加此监听器。
protected void fireResultListeners(Result result);解除新的结果,一旦它们变的可用。Fires new results as soon as they become available.
public String toString():此对象的字符串表示,即name属性。
转自:http://blog.csdn.net/taiyb/article/details/41495735
- sphinx 4 AbstractDecoder
- sphinx 4 AbstractDecoder
- Sphinx-4
- sphinx-release 2.1.4
- sphinx
- sphinx
- sphinx
- sphinx
- Sphinx
- Sphinx
- Sphinx
- sphinx
- sphinx
- sphinx
- sphinx
- Sphinx
- sphinx
- Sphinx
- mysql 利用@rownum生成自定义排序值
- PullToRefreshListView 自定义介绍
- 制造StackOverflowError与OutOfMemoryError
- [bzoj2144]跳跳棋 LCA
- 希尔排序
- sphinx 4 AbstractDecoder
- provisioning profile doesn't include signing certificate
- JNI开发之基本数据类型转换
- Google APIDemo
- autolayout 约束优先级
- jsoncpp 的学习和简单的使用案例
- 001_内核对象概述
- SpringBoot 使用 @Value 从 YAML文件读取属性
- 下载编译Spring源码时出现Cannot change dependencies of configuration ':spring-orm-hibernate4:runtimeMerge