#include <stdio.h>
#include <logmath.h>
#include "s3types.h"
Go to the source code of this file.
Classes | |
| struct | lmclass_word_s |
| struct | lmclass_s |
| struct | lmclass_set_s |
Defines | |
| #define | lmclass_getname(class) ((class)->name) |
| #define | lmclass_firstword(class) ((class)->wordlist) |
| #define | lmclass_nextword(class, w) ((w)->next) |
| #define | lmclass_getwid(w) ((w)->dictwid) |
| #define | lmclass_getword(w) ((w)->word) |
| #define | lmclass_getprob(w) ((w)->LOGprob) |
| #define | lmclass_isclass(cl) ((cl) != NULL) |
| #define | lmclass_isword(w) ((w) != NULL) |
| #define | lmclass_firstclass(set) ((set)->lmclass_list) |
| #define | lmclass_nextclass(set, cl) ((cl)->next) |
Typedefs | |
| typedef lmclass_word_s | lmclass_word_t |
| typedef lmclass_s | lmclass_t |
| typedef lmclass_set_s | lmclass_set_t |
Functions | |
| lmclass_set_t * | lmclass_newset (void) |
| void | lmclass_free (lmclass_t *lmclass) |
| lmclass_set_t * | lmclass_loadfile (lmclass_set_t *lmclass_set, char *file, logmath_t *logmath) |
| lmclass_t * | lmclass_get_lmclass (lmclass_set_t *set, char *name) |
| int32 | lmclass_get_nclass (lmclass_set_t *set) |
| void | lmclass_set_dictwid (lmclass_word_t *w, int32 dictwid) |
| void | lmclass_dump (lmclass_t *cl, FILE *fp) |
| void | lmclass_set_dump (lmclass_set_t *set, FILE *fp) |
|
|
|
|
|
|
|
|
Various access functions (macros) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
Get the LMclass object for the given name from the given set. |
|
|
Get the number of LMclass objects in the given set. |
|
||||||||||||||||
|
Load LM classes defined in the given file into the given set, and return the new, updated set. Note that the input file can contain several class definitions. File format: LMCLASS <classname1> <word1> [<prob1>] <word2> [<prob2>] ... (each word, and its associated probability, in one line) END <classname1> LMCLASS <classname2> ... END <classname2> ... (as many classes as desired) By convention, classname strings begin and end with [ and ] (Roni Rosenfeld). But it is not a REQUIREMENT as far as this module is concerned. Word probabilities are optional (as indicated by the [] above). If p = sum of all EXPLICITLY specified probs within a class, (1-p) will be uniformly distributed between the remaining words in that class. Lines beginning with a # IN THE FIRST COLUMN are comments and are ignored.
|
|
|
Initialize and return a new, empty LMclass set |
|
||||||||||||
|
Set the dictwid field of the given LMclass word entry to the given value |
|
||||||||||||
|
|
1.3.9.1