#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "toolkit.h"
#include "ngram.h"
#include "pc_libs/pc_general.h"
#include "rr_libs/general.h"
Go to the source code of this file.
Defines | |
#define | BINARY 1 |
#define | ASCII 2 |
#define | WORDS 3 |
#define | NUMERIC 1 |
#define | ALPHA 2 |
Functions | |
void | main (int argc, char *argv[]) |
Converts a n-gram stream in to an m-gram stream, where n > m
Input (from the standard input) can either be :
a binary id n-gram file an ascii id n-gram file a word n-gram file
Output (at the standard output) will be the same format of the input.
Note: Program is not intelligent enough to be able to tell value of n from the input, so user must specify it on the command line.
Definition in file ngram2mgram.c.
|
Definition at line 44 of file ngram2mgram.c. Referenced by main(). |
|
Definition at line 40 of file ngram2mgram.c. Referenced by main(). |
|
Definition at line 39 of file ngram2mgram.c. Referenced by main(). |
|
Definition at line 43 of file ngram2mgram.c. Referenced by main(). |
|
Definition at line 41 of file ngram2mgram.c. Referenced by main(). |
|
Definition at line 58 of file ngram2mgram.c. References ALPHA, ASCII, BINARY, count_t, DEFAULT_VERBOSITY, flag, fprintf(), i, MAX_WORD_LENGTH, NUMERIC, pc_flagarg(), pc_intarg(), pc_message(), pc_report_unk_args(), quit(), report_version(), rr_feof(), rr_fread(), rr_fwrite(), rr_malloc(), verbosity, and WORDS. |