\doxysection{ngram\+\_\+model.\+h}
\label{ngram__model_8h_source}\index{include/sphinxbase/ngram\_model.h@{include/sphinxbase/ngram\_model.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*\ -\/*-\/\ c-\/basic-\/offset:\ 4;\ indent-\/tabs-\/mode:\ nil\ -\/*-\/\ */}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*\ ====================================================================}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ Copyright\ (c)\ 2007\ Carnegie\ Mellon\ University.\ \ All\ rights}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ Redistribution\ and\ use\ in\ source\ and\ binary\ forms,\ with\ or\ without}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ modification,\ are\ permitted\ provided\ that\ the\ following\ conditions}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ are\ met:}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ 1.\ Redistributions\ of\ source\ code\ must\ retain\ the\ above\ copyright}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer.\ }}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ 2.\ Redistributions\ in\ binary\ form\ must\ reproduce\ the\ above\ copyright}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer\ in}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ \ \ the\ documentation\ and/or\ other\ materials\ provided\ with\ the}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ \ \ \ distribution.}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ This\ work\ was\ supported\ in\ part\ by\ funding\ from\ the\ Defense\ Advanced\ }}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ Research\ Projects\ Agency\ and\ the\ National\ Science\ Foundation\ of\ the\ }}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ United\ States\ of\ America,\ and\ the\ CMU\ Sphinx\ Speech\ Consortium.}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ THIS\ SOFTWARE\ IS\ PROVIDED\ BY\ CARNEGIE\ MELLON\ UNIVERSITY\ \`{}\`{}AS\ IS''\ AND\ }}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ ANY\ EXPRESSED\ OR\ IMPLIED\ WARRANTIES,\ INCLUDING,\ BUT\ NOT\ LIMITED\ TO,\ }}
\DoxyCodeLine{00024\ \textcolor{comment}{\ *\ THE\ IMPLIED\ WARRANTIES\ OF\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ A\ PARTICULAR}}
\DoxyCodeLine{00025\ \textcolor{comment}{\ *\ PURPOSE\ ARE\ DISCLAIMED.\ \ IN\ NO\ EVENT\ SHALL\ CARNEGIE\ MELLON\ UNIVERSITY}}
\DoxyCodeLine{00026\ \textcolor{comment}{\ *\ NOR\ ITS\ EMPLOYEES\ BE\ LIABLE\ FOR\ ANY\ DIRECT,\ INDIRECT,\ INCIDENTAL,}}
\DoxyCodeLine{00027\ \textcolor{comment}{\ *\ SPECIAL,\ EXEMPLARY,\ OR\ CONSEQUENTIAL\ DAMAGES\ (INCLUDING,\ BUT\ NOT\ }}
\DoxyCodeLine{00028\ \textcolor{comment}{\ *\ LIMITED\ TO,\ PROCUREMENT\ OF\ SUBSTITUTE\ GOODS\ OR\ SERVICES;\ LOSS\ OF\ USE,\ }}
\DoxyCodeLine{00029\ \textcolor{comment}{\ *\ DATA,\ OR\ PROFITS;\ OR\ BUSINESS\ INTERRUPTION)\ HOWEVER\ CAUSED\ AND\ ON\ ANY\ }}
\DoxyCodeLine{00030\ \textcolor{comment}{\ *\ THEORY\ OF\ LIABILITY,\ WHETHER\ IN\ CONTRACT,\ STRICT\ LIABILITY,\ OR\ TORT\ }}
\DoxyCodeLine{00031\ \textcolor{comment}{\ *\ (INCLUDING\ NEGLIGENCE\ OR\ OTHERWISE)\ ARISING\ IN\ ANY\ WAY\ OUT\ OF\ THE\ USE\ }}
\DoxyCodeLine{00032\ \textcolor{comment}{\ *\ OF\ THIS\ SOFTWARE,\ EVEN\ IF\ ADVISED\ OF\ THE\ POSSIBILITY\ OF\ SUCH\ DAMAGE.}}
\DoxyCodeLine{00033\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00034\ \textcolor{comment}{\ *\ ====================================================================}}
\DoxyCodeLine{00035\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00036\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\#ifndef\ \_\_NGRAM\_MODEL\_H\_\_}}
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#define\ \_\_NGRAM\_MODEL\_H\_\_}}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \textcolor{preprocessor}{\#include\ <stdarg.h>}}
\DoxyCodeLine{00047\ }
\DoxyCodeLine{00048\ \textcolor{comment}{/*\ Win32/WinCE\ DLL\ gunk\ */}}
\DoxyCodeLine{00049\ \textcolor{preprocessor}{\#include\ <sphinxbase/sphinxbase\_export.h>}}
\DoxyCodeLine{00050\ \textcolor{preprocessor}{\#include\ <sphinxbase/prim\_type.h>}}
\DoxyCodeLine{00051\ \textcolor{preprocessor}{\#include\ <sphinxbase/cmd\_ln.h>}}
\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#include\ <sphinxbase/logmath.h>}}
\DoxyCodeLine{00053\ \textcolor{preprocessor}{\#include\ <sphinxbase/mmio.h>}}
\DoxyCodeLine{00054\ }
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00056\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}\ \{}
\DoxyCodeLine{00057\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00058\ \textcolor{preprocessor}{\#if\ 0}}
\DoxyCodeLine{00059\ \textcolor{comment}{/*\ Fool\ Emacs.\ */}}
\DoxyCodeLine{00060\ \}}
\DoxyCodeLine{00061\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00066\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }ngram\_model\_s\ ngram\_model\_t;}
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00071\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }ngram\_class\_s\ ngram\_class\_t;}
\DoxyCodeLine{00072\ }
\DoxyCodeLine{00076\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{enum}\ ngram\_file\_type\_e\ \{}
\DoxyCodeLine{00077\ \ \ \ \ NGRAM\_INVALID\ =\ -\/1,\ }
\DoxyCodeLine{00078\ \ \ \ \ NGRAM\_AUTO,\ \ }
\DoxyCodeLine{00079\ \ \ \ \ NGRAM\_ARPA,\ \ }
\DoxyCodeLine{00080\ \ \ \ \ NGRAM\_DMP,\ \ \ }
\DoxyCodeLine{00081\ \ \ \ \ NGRAM\_DMP32,\ }
\DoxyCodeLine{00082\ \}\ ngram\_file\_type\_t;}
\DoxyCodeLine{00083\ }
\DoxyCodeLine{00084\ \textcolor{preprocessor}{\#define\ NGRAM\_INVALID\_WID\ -\/1\ }}
\DoxyCodeLine{00106\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00107\ ngram\_model\_t\ *ngram\_model\_read(cmd\_ln\_t\ *config,}
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *file\_name,}
\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ngram\_file\_type\_t\ file\_type,}
\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ logmath\_t\ *lmath);}
\DoxyCodeLine{00111\ }
\DoxyCodeLine{00117\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00118\ \textcolor{keywordtype}{int}\ ngram\_model\_write(ngram\_model\_t\ *model,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *file\_name,}
\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ngram\_file\_type\_t\ format);}
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00126\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00127\ ngram\_file\_type\_t\ ngram\_file\_name\_to\_type(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *file\_name);}
\DoxyCodeLine{00128\ }
\DoxyCodeLine{00134\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00135\ ngram\_file\_type\_t\ ngram\_str\_to\_type(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *str\_name);}
\DoxyCodeLine{00136\ }
\DoxyCodeLine{00143\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00144\ \textcolor{keywordtype}{char}\ \textcolor{keyword}{const}\ *ngram\_type\_to\_str(\textcolor{keywordtype}{int}\ type);}
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00151\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00152\ ngram\_model\_t\ *ngram\_model\_retain(ngram\_model\_t\ *model);}
\DoxyCodeLine{00153\ }
\DoxyCodeLine{00159\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00160\ \textcolor{keywordtype}{int}\ ngram\_model\_free(ngram\_model\_t\ *model);}
\DoxyCodeLine{00161\ }
\DoxyCodeLine{00178\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00179\ \textcolor{keywordtype}{int}\ ngram\_model\_recode(ngram\_model\_t\ *model,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *from,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *to);}
\DoxyCodeLine{00180\ }
\DoxyCodeLine{00184\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{enum}\ ngram\_case\_e\ \{}
\DoxyCodeLine{00185\ \ \ \ \ NGRAM\_UPPER,}
\DoxyCodeLine{00186\ \ \ \ \ NGRAM\_LOWER}
\DoxyCodeLine{00187\ \}\ ngram\_case\_t;}
\DoxyCodeLine{00188\ }
\DoxyCodeLine{00195\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00196\ \textcolor{keywordtype}{int}\ ngram\_model\_casefold(ngram\_model\_t\ *model,\ \textcolor{keywordtype}{int}\ kase);}
\DoxyCodeLine{00197\ }
\DoxyCodeLine{00209\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00210\ \textcolor{keywordtype}{int}\ ngram\_model\_apply\_weights(ngram\_model\_t\ *model,}
\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ float32\ lw,\ float32\ wip,\ float32\ uw);}
\DoxyCodeLine{00212\ }
\DoxyCodeLine{00221\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00222\ float32\ ngram\_model\_get\_weights(ngram\_model\_t\ *model,\ int32\ *out\_log\_wip,}
\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ *out\_log\_uw);}
\DoxyCodeLine{00224\ }
\DoxyCodeLine{00257\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00258\ int32\ ngram\_score(ngram\_model\_t\ *model,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *word,\ ...);}
\DoxyCodeLine{00259\ }
\DoxyCodeLine{00263\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00264\ int32\ ngram\_tg\_score(ngram\_model\_t\ *model,}
\DoxyCodeLine{00265\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ w3,\ int32\ w2,\ int32\ w1,}
\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ *n\_used);}
\DoxyCodeLine{00267\ }
\DoxyCodeLine{00271\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00272\ int32\ ngram\_bg\_score(ngram\_model\_t\ *model,}
\DoxyCodeLine{00273\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ w2,\ int32\ w1,}
\DoxyCodeLine{00274\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ *n\_used);}
\DoxyCodeLine{00275\ }
\DoxyCodeLine{00279\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00280\ int32\ ngram\_ng\_score(ngram\_model\_t\ *model,\ int32\ wid,\ int32\ *history,}
\DoxyCodeLine{00281\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ n\_hist,\ int32\ *n\_used);}
\DoxyCodeLine{00282\ }
\DoxyCodeLine{00293\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00294\ int32\ ngram\_prob(ngram\_model\_t\ *model,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *word,\ ...);}
\DoxyCodeLine{00295\ }
\DoxyCodeLine{00302\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00303\ int32\ ngram\_ng\_prob(ngram\_model\_t\ *model,\ int32\ wid,\ int32\ *history,}
\DoxyCodeLine{00304\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ n\_hist,\ int32\ *n\_used);}
\DoxyCodeLine{00305\ }
\DoxyCodeLine{00317\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00318\ int32\ ngram\_score\_to\_prob(ngram\_model\_t\ *model,\ int32\ score);}
\DoxyCodeLine{00319\ }
\DoxyCodeLine{00323\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00324\ int32\ ngram\_wid(ngram\_model\_t\ *model,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *word);}
\DoxyCodeLine{00325\ }
\DoxyCodeLine{00329\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00330\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *ngram\_word(ngram\_model\_t\ *model,\ int32\ wid);}
\DoxyCodeLine{00331\ }
\DoxyCodeLine{00345\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00346\ int32\ ngram\_unknown\_wid(ngram\_model\_t\ *model);}
\DoxyCodeLine{00347\ }
\DoxyCodeLine{00351\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00352\ int32\ ngram\_zero(ngram\_model\_t\ *model);}
\DoxyCodeLine{00353\ }
\DoxyCodeLine{00357\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00358\ int32\ ngram\_model\_get\_size(ngram\_model\_t\ *model);}
\DoxyCodeLine{00359\ }
\DoxyCodeLine{00363\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00364\ int32\ \textcolor{keyword}{const}\ *ngram\_model\_get\_counts(ngram\_model\_t\ *model);}
\DoxyCodeLine{00365\ }
\DoxyCodeLine{00369\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }ngram\_iter\_s\ ngram\_iter\_t;}
\DoxyCodeLine{00370\ }
\DoxyCodeLine{00379\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00380\ ngram\_iter\_t\ *ngram\_model\_mgrams(ngram\_model\_t\ *model,\ \textcolor{keywordtype}{int}\ m);}
\DoxyCodeLine{00381\ }
\DoxyCodeLine{00385\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00386\ ngram\_iter\_t\ *ngram\_iter(ngram\_model\_t\ *model,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *word,\ ...);}
\DoxyCodeLine{00387\ }
\DoxyCodeLine{00391\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00392\ ngram\_iter\_t\ *ngram\_ng\_iter(ngram\_model\_t\ *model,\ int32\ wid,\ int32\ *history,\ int32\ n\_hist);}
\DoxyCodeLine{00393\ }
\DoxyCodeLine{00402\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00403\ int32\ \textcolor{keyword}{const}\ *ngram\_iter\_get(ngram\_iter\_t\ *itor,}
\DoxyCodeLine{00404\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ *out\_score,}
\DoxyCodeLine{00405\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ *out\_bowt);}
\DoxyCodeLine{00406\ }
\DoxyCodeLine{00412\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00413\ ngram\_iter\_t\ *ngram\_iter\_successors(ngram\_iter\_t\ *itor);}
\DoxyCodeLine{00414\ }
\DoxyCodeLine{00418\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00419\ ngram\_iter\_t\ *ngram\_iter\_next(ngram\_iter\_t\ *itor);}
\DoxyCodeLine{00420\ }
\DoxyCodeLine{00424\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00425\ \textcolor{keywordtype}{void}\ ngram\_iter\_free(ngram\_iter\_t\ *itor);}
\DoxyCodeLine{00426\ }
\DoxyCodeLine{00439\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00440\ int32\ ngram\_model\_add\_word(ngram\_model\_t\ *model,}
\DoxyCodeLine{00441\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *word,\ float32\ weight);}
\DoxyCodeLine{00442\ }
\DoxyCodeLine{00456\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00457\ int32\ ngram\_model\_read\_classdef(ngram\_model\_t\ *model,}
\DoxyCodeLine{00458\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *file\_name);}
\DoxyCodeLine{00459\ }
\DoxyCodeLine{00468\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00469\ int32\ ngram\_model\_add\_class(ngram\_model\_t\ *model,}
\DoxyCodeLine{00470\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *classname,}
\DoxyCodeLine{00471\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ float32\ classweight,}
\DoxyCodeLine{00472\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ **words,}
\DoxyCodeLine{00473\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ float32\ *weights,}
\DoxyCodeLine{00474\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ n\_words);}
\DoxyCodeLine{00475\ }
\DoxyCodeLine{00485\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00486\ int32\ ngram\_model\_add\_class\_word(ngram\_model\_t\ *model,}
\DoxyCodeLine{00487\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *classname,}
\DoxyCodeLine{00488\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *word,}
\DoxyCodeLine{00489\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ float32\ weight);}
\DoxyCodeLine{00490\ }
\DoxyCodeLine{00515\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00516\ ngram\_model\_t\ *ngram\_model\_set\_init(cmd\_ln\_t\ *config,}
\DoxyCodeLine{00517\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ngram\_model\_t\ **models,}
\DoxyCodeLine{00518\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ **names,}
\DoxyCodeLine{00519\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ float32\ *weights,}
\DoxyCodeLine{00520\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ n\_models);}
\DoxyCodeLine{00521\ }
\DoxyCodeLine{00552\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00553\ ngram\_model\_t\ *ngram\_model\_set\_read(cmd\_ln\_t\ *config,}
\DoxyCodeLine{00554\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *lmctlfile,}
\DoxyCodeLine{00555\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ logmath\_t\ *lmath);}
\DoxyCodeLine{00556\ }
\DoxyCodeLine{00560\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00561\ int32\ ngram\_model\_set\_count(ngram\_model\_t\ *set);}
\DoxyCodeLine{00562\ }
\DoxyCodeLine{00566\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }ngram\_model\_set\_iter\_s\ ngram\_model\_set\_iter\_t;}
\DoxyCodeLine{00567\ }
\DoxyCodeLine{00573\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00574\ ngram\_model\_set\_iter\_t\ *ngram\_model\_set\_iter(ngram\_model\_t\ *set);}
\DoxyCodeLine{00575\ }
\DoxyCodeLine{00581\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00582\ ngram\_model\_set\_iter\_t\ *ngram\_model\_set\_iter\_next(ngram\_model\_set\_iter\_t\ *itor);}
\DoxyCodeLine{00583\ }
\DoxyCodeLine{00587\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00588\ \textcolor{keywordtype}{void}\ ngram\_model\_set\_iter\_free(ngram\_model\_set\_iter\_t\ *itor);}
\DoxyCodeLine{00589\ }
\DoxyCodeLine{00597\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00598\ ngram\_model\_t\ *ngram\_model\_set\_iter\_model(ngram\_model\_set\_iter\_t\ *itor,}
\DoxyCodeLine{00599\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ \textcolor{keyword}{const}\ **lmname);}
\DoxyCodeLine{00600\ }
\DoxyCodeLine{00607\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00608\ ngram\_model\_t\ *ngram\_model\_set\_select(ngram\_model\_t\ *set,}
\DoxyCodeLine{00609\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name);}
\DoxyCodeLine{00610\ }
\DoxyCodeLine{00617\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00618\ ngram\_model\_t\ *ngram\_model\_set\_lookup(ngram\_model\_t\ *set,}
\DoxyCodeLine{00619\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name);}
\DoxyCodeLine{00620\ }
\DoxyCodeLine{00624\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00625\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *ngram\_model\_set\_current(ngram\_model\_t\ *set);}
\DoxyCodeLine{00626\ }
\DoxyCodeLine{00634\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00635\ ngram\_model\_t\ *ngram\_model\_set\_interp(ngram\_model\_t\ *set,}
\DoxyCodeLine{00636\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ **names,}
\DoxyCodeLine{00637\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ float32\ *weights);}
\DoxyCodeLine{00638\ }
\DoxyCodeLine{00651\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00652\ ngram\_model\_t\ *ngram\_model\_set\_add(ngram\_model\_t\ *set,}
\DoxyCodeLine{00653\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ngram\_model\_t\ *model,}
\DoxyCodeLine{00654\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name,}
\DoxyCodeLine{00655\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ float32\ weight,}
\DoxyCodeLine{00656\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ reuse\_widmap);}
\DoxyCodeLine{00657\ }
\DoxyCodeLine{00666\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00667\ ngram\_model\_t\ *ngram\_model\_set\_remove(ngram\_model\_t\ *set,}
\DoxyCodeLine{00668\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name,}
\DoxyCodeLine{00669\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ reuse\_widmap);}
\DoxyCodeLine{00670\ }
\DoxyCodeLine{00674\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00675\ \textcolor{keywordtype}{void}\ ngram\_model\_set\_map\_words(ngram\_model\_t\ *set,}
\DoxyCodeLine{00676\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ **words,}
\DoxyCodeLine{00677\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ n\_words);}
\DoxyCodeLine{00678\ }
\DoxyCodeLine{00686\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00687\ int32\ ngram\_model\_set\_current\_wid(ngram\_model\_t\ *set,}
\DoxyCodeLine{00688\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ set\_wid);}
\DoxyCodeLine{00689\ }
\DoxyCodeLine{00699\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00700\ int32\ ngram\_model\_set\_known\_wid(ngram\_model\_t\ *set,\ int32\ set\_wid);}
\DoxyCodeLine{00701\ }
\DoxyCodeLine{00709\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00710\ \textcolor{keywordtype}{void}\ ngram\_model\_flush(ngram\_model\_t\ *lm);}
\DoxyCodeLine{00711\ }
\DoxyCodeLine{00712\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00713\ \}}
\DoxyCodeLine{00714\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00715\ }
\DoxyCodeLine{00716\ }
\DoxyCodeLine{00717\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ \_\_NGRAM\_MODEL\_H\_\_\ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
