Main Page   Compound List   File List   Compound Members   File Members  

wngram2idngram.c File Reference

Convert a word n-gram file to an id n-gram file. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/utsname.h>
#include <sys/types.h>
#include "toolkit.h"
#include "rr_libs/general.h"
#include "pc_libs/pc_general.h"
#include "idngram.h"

Go to the source code of this file.

Compounds

struct  ngram_rec

Defines

#define DEFAULT_HASH_SIZE   200000
#define DEFAULT_MAX_FILES   20
#define MAX_N   20
#define TEMP_FILE_ROOT   "wngram2idngram.temp."

Functions

int compare_ngrams2 (const void *ngram1, const void *ngram2)
void main (int argc, char *argv[])


Detailed Description

Convert a word n-gram file to an id n-gram file.

Definition in file wngram2idngram.c.


Define Documentation

#define DEFAULT_HASH_SIZE   200000
 

Definition at line 25 of file wngram2idngram.c.

Referenced by main().

#define DEFAULT_MAX_FILES   20
 

Definition at line 26 of file wngram2idngram.c.

Referenced by main().

#define MAX_N   20
 

Definition at line 27 of file wngram2idngram.c.

#define TEMP_FILE_ROOT   "wngram2idngram.temp."
 

Definition at line 28 of file wngram2idngram.c.

Referenced by main().


Function Documentation

int compare_ngrams2 const void *    ngram1,
const void *    ngram2
 

Definition at line 46 of file wngram2idngram.c.

References i, and ngram_rec::word.

Referenced by main().

void main int    argc,
char *    argv[]
 

Definition at line 76 of file wngram2idngram.c.

References add_to_hashtable(), compare_ngrams2(), ngram_rec::count, DEFAULT_HASH_SIZE, DEFAULT_MAX_FILES, DEFAULT_N, DEFAULT_TEMP, DEFAULT_VERBOSITY, flag, fprintf(), get_word(), hash(), i, index2(), j, MAX_VOCAB_SIZE, MAX_WORD_LENGTH, merge_tempfiles(), nearest_prime(), new_hashtable(), pc_flagarg(), pc_intarg(), pc_message(), pc_report_unk_args(), pc_stringarg(), quit(), report_version(), rr_feof(), rr_fopen(), rr_fwrite(), rr_iopen(), rr_malloc(), rr_oclose(), salloc(), STD_MEM, TEMP_FILE_ROOT, verbosity, and ngram_rec::word.


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