Main Page   Compound List   File List   Compound Members   File Members  

rr_libs/read_voc.c File Reference

Read/Write functions of pre-compiled vocabulary hash table. More...

#include <stdio.h>
#include <strings.h>
#include "general.h"
#include "sih.h"

Go to the source code of this file.

Functions

void read_voc (char *filename, int verbosity, sih_t *p_vocab_ht, char ***p_vocab, unsigned short *p_vocab_size)
void get_vocab_from_vocab_ht (sih_t *ht, int vocab_size, int verbosity, char ***p_vocab)


Detailed Description

Read/Write functions of pre-compiled vocabulary hash table.

If the file's extension is "vocab_ht" (or the file's name is "vocab_ht"), it is assumed to be a pre-compiled vocabulary hash table. Otherwise it is assumed to be a regular .vocab file.

Definition in file read_voc.c.


Function Documentation

void get_vocab_from_vocab_ht sih_t   ht,
int    vocab_size,
int    verbosity,
char ***    p_vocab
 

derive the vocab from the vocab hash table

Definition at line 74 of file read_voc.c.

References fprintf(), sih_slot_t::intval, sih_t::nslots, quit(), rr_malloc(), sih_t::slots, sih_slot_t::string, and verbosity.

Referenced by load_lm(), and read_voc().

void read_voc char *    filename,
int    verbosity,
sih_t   p_vocab_ht,
char ***    p_vocab,
unsigned short *    p_vocab_size
 

Definition at line 34 of file read_voc.c.

References get_vocab_from_vocab_ht(), sih_t::nentries, read_wlist_into_array(), read_wlist_into_siht(), rr_iclose(), rr_iopen(), salloc(), sih_val_read_from_file(), and verbosity.

Referenced by main().


Generated on Tue Dec 21 13:54:47 2004 by doxygen1.2.18