Main Page   Compound List   File List   Compound Members   File Members  

mergeidngram.c File Reference

merge multiple idngram into one. More...

#include <stdio.h>
#include <stdlib.h>
#include "pc_libs/pc_general.h"
#include "toolkit.h"
#include "rr_libs/general.h"

Go to the source code of this file.

Compounds

struct  ngram
 structure of id-ngram More...


Typedefs

typedef unsigned short id__t

Functions

void updateArgs (int *pargc, char **argv, int rm_cnt)
void procComLine (int *argc, char **argv)
void printUsage (char *name)
int cmp_ngram (ngram *ng1, ngram *ng2)
int get_ngram (FILE *id_ngram_fp, ngram *ng, flag ascii)
void write_ngram (FILE *id_ngram_fp, ngram *ng, flag ascii)
int main (int argc, char **argv)

Variables

int n
flag ascii_in
flag ascii_out


Detailed Description

merge multiple idngram into one.

Definition in file mergeidngram.c.


Typedef Documentation

typedef unsigned short id__t
 

Definition at line 26 of file mergeidngram.c.

Referenced by main(), and write_ngram().


Function Documentation

int cmp_ngram ngram   ng1,
ngram   ng2
 

Definition at line 142 of file mergeidngram.c.

References i, ngram::id_array, ngram::n, and quit().

Referenced by main().

int get_ngram FILE *    id_ngram_fp,
ngram   ng,
flag    ascii
 

Definition at line 31 of file get_ngram.c.

References ngram::count, count_t, flag, i, ngram::id_array, ngram::n, quit(), rr_feof(), and rr_fread().

Referenced by calc_mem_req(), and main().

int main int    argc,
char **    argv
 

Definition at line 157 of file mergeidngram.c.

References ascii_in, ascii_out, cmp_ngram(), ngram::count, flag, fprintf(), get_ngram(), i, id__t, ngram::id_array, j, MAX_VOCAB_SIZE, ngram::n, n, printUsage(), procComLine(), report_version(), rr_calloc(), rr_iclose(), rr_iopen(), rr_malloc(), and write_ngram().

void printUsage char *    name
 

Definition at line 131 of file mergeidngram.c.

References fprintf().

Referenced by main(), and procComLine().

void procComLine int *    argc,
char **    argv
 

Definition at line 90 of file mergeidngram.c.

References ascii_in, ascii_out, i, n, printUsage(), and updateArgs().

Referenced by main().

void updateArgs int *    pargc,
char **    argv,
int    rm_cnt
 

Definition at line 78 of file mergeidngram.c.

References i, and updateArgs().

Referenced by main(), procComLine(), and updateArgs().

void write_ngram FILE *    id_ngram_fp,
ngram   ng,
flag    ascii
 

Definition at line 52 of file mergeidngram.c.

References ngram::count, flag, fprintf(), i, id__t, ngram::id_array, n, quit(), and rr_fwrite().

Referenced by main().


Variable Documentation

flag ascii_in
 

Definition at line 42 of file mergeidngram.c.

Referenced by main(), and procComLine().

flag ascii_out
 

Definition at line 43 of file mergeidngram.c.

Referenced by main(), and procComLine().

int n
 

Definition at line 41 of file mergeidngram.c.

Referenced by main(), procComLine(), and write_ngram().


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