Frog
|
#include <cstdlib>
#include <cstdio>
#include <sys/wait.h>
#include <signal.h>
#include <string>
#include <cstring>
#include <random>
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include "config.h"
#include "timbl/TimblAPI.h"
#include "ticcutils/FdStream.h"
#include "ticcutils/ServerBase.h"
#include "frog/Frog-util.h"
#include "frog/FrogAPI.h"
#include "frog/ucto_tokenizer_mod.h"
#include "frog/tagger_base.h"
#include "ticcutils/StringOps.h"
#include "ticcutils/CommandLine.h"
#include "ticcutils/FileUtils.h"
Macros | |
#define | LOG *TiCC::Log(theErrLog) |
#define | DBG *TiCC::Log(theDbgLog) |
Functions | |
void | usage () |
bool | parse_args (TiCC::CL_Options &Opts, FrogOptions &options, TiCC::LogStream *theErrLog) |
void | KillServerFun (int Signal) |
unsigned long long | random64 () |
string | randnum (int len) |
int | main (int argc, char *argv[]) |
Variables | |
string | testDirName |
string | outputFileName |
bool | wantOUT |
string | XMLoutFileName |
string | outputDirName |
string | xmlDirName |
set< string > | fileNames |
TiCC::Configuration | configuration |
#define DBG *TiCC::Log(theDbgLog) |
#define LOG *TiCC::Log(theErrLog) |
void KillServerFun | ( | int | Signal | ) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Frog's main program.
bool parse_args | ( | TiCC::CL_Options & | Opts, |
FrogOptions & | options, | ||
TiCC::LogStream * | theErrLog | ||
) |
process the command line and fill FrogOptions to initialize the API also fill some globals we use for our own main.
Opts | The command line options we have received |
options | The FrogOptions structure we will fill |
theErrLog | the stream to send error messages to return true on succes |
string randnum | ( | int | len | ) |
generate a rather random string of length len
len | The length of the output string |
We generate a 64 bit random number an convert is to a string. Then this string is truncated at len characters. (which means that the result migth be NOT unique!)
unsigned long long random64 | ( | ) |
generate a 64 bit random number
void usage | ( | ) |
TiCC::Configuration configuration |
set<string> fileNames |
string outputDirName |
string outputFileName |
string testDirName |
bool wantOUT |
string xmlDirName |
string XMLoutFileName |