PocketSphinx  5.0.0
A small speech recognizer
Public Member Functions | List of all members
ngram_iter_t Struct Reference

M-gram (yes, M-gram) iterator object. More...

#include <pocketsphinx/model.h>

Public Member Functions

POCKETSPHINX_EXPORT const int32 * ngram_iter_get (ngram_iter_t *itor, int32 *out_score, int32 *out_bowt)
 
POCKETSPHINX_EXPORT ngram_iter_tngram_iter_successors (ngram_iter_t *itor)
 
POCKETSPHINX_EXPORT ngram_iter_tngram_iter_next (ngram_iter_t *itor)
 
POCKETSPHINX_EXPORT void ngram_iter_free (ngram_iter_t *itor)
 

Detailed Description

M-gram (yes, M-gram) iterator object.

This is an iterator over the N-Gram successors of a given word or N-1-Gram, that is why it is called "M" and not "N".

Member Function Documentation

◆ ngram_iter_get()

POCKETSPHINX_EXPORT const int32 * ngram_iter_get ( ngram_iter_t itor,
int32 *  out_score,
int32 *  out_bowt 
)

Get information from the current M-gram in an iterator.

Parameters
out_scoreOutput: Score for this M-gram (including any word penalty and language weight).
out_bowtOutput: Backoff weight for this M-gram.
Returns
read-only array of word IDs.

◆ ngram_iter_successors()

POCKETSPHINX_EXPORT ngram_iter_t * ngram_iter_successors ( ngram_iter_t itor)

Iterate over all M-gram successors of an M-1-gram.

Parameters
itorIterator pointing to the M-1-gram to get successors of.

◆ ngram_iter_next()

POCKETSPHINX_EXPORT ngram_iter_t * ngram_iter_next ( ngram_iter_t itor)

Advance an M-gram iterator.

◆ ngram_iter_free()

POCKETSPHINX_EXPORT void ngram_iter_free ( ngram_iter_t itor)

Terminate an M-gram iterator.


The documentation for this struct was generated from the following file: