#include <sent/stddefs.h>
#include <sent/ngram2.h>
Include dependency graph for ngram_write_bin.c:
Go to the source code of this file.
Functions | |
static void | wrt (FILE *fp, void *buf, size_t unitbyte, int unitnum) |
static void | write_header (FILE *fp, char *str, int version) |
boolean | ngram_write_bin (FILE *fp, NGRAM_INFO *ndata, char *headerstr) |
Variables | |
static boolean | need_swap |
TRUE if need byte swap. |
There is full upward- and cross-machine compatibility in 3.5. Old binary N-gram files still can be read directly, in which case the conversion to 24bit index will performed just after model has been read. Byte order will also considered by header information, so binary N-gram still can be used among different machines.
Definition in file ngram_write_bin.c.
|
Binary write function, with byte swapping if needed.
Definition at line 66 of file ngram_write_bin.c. |
|
Write header information, with identifier string.
Definition at line 89 of file ngram_write_bin.c. Referenced by ngram_write_bin(). |
|
Write a whole N-gram data in binary format.
Definition at line 128 of file ngram_write_bin.c. |