Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
compile-features.C File Reference

Definition for executable that reads in reranker::CandidateSet instances and either outputs all symbolic feature names, or else reads in a symbol table from file and compiles all feature vectors in each reranker::CandidateSet instance using that supplied symbol table, serializing the reranker::CandidateSet instances to stdout. More...

#include <string>
#include <cstdlib>
#include <memory>
#include <vector>
#include "../proto/dataio.h"
#include "candidate-set.H"
#include "candidate-set-iterator.H"
#include "candidate-set-writer.H"
#include "executive-feature-extractor.H"
#include "symbol-table.H"

Go to the source code of this file.

Macros

#define PROG_NAME   "compile-features"
 
#define DEFAULT_MAX_EXAMPLES   -1
 
#define DEFAULT_MAX_CANDIDATES   -1
 
#define DEFAULT_REPORTING_INTERVAL   1000
 
#define XSTR(arg)   STR(arg)
 
#define STR(arg)   #arg
 

Functions

void usage ()
 Emits usage message to standard output. More...
 
bool check_for_required_arg (int argc, int i, string err_msg)
 
int main (int argc, char **argv)
 

Variables

const char * usage_msg []
 

Detailed Description

Definition for executable that reads in reranker::CandidateSet instances and either outputs all symbolic feature names, or else reads in a symbol table from file and compiles all feature vectors in each reranker::CandidateSet instance using that supplied symbol table, serializing the reranker::CandidateSet instances to stdout.

Author
dbike.nosp@m.l@go.nosp@m.ogle..nosp@m.com (Dan Bikel)

Definition in file compile-features.C.

Macro Definition Documentation

#define DEFAULT_MAX_CANDIDATES   -1

Definition at line 55 of file compile-features.C.

#define DEFAULT_MAX_EXAMPLES   -1

Definition at line 54 of file compile-features.C.

#define DEFAULT_REPORTING_INTERVAL   1000

Definition at line 56 of file compile-features.C.

#define PROG_NAME   "compile-features"

Definition at line 52 of file compile-features.C.

#define STR (   arg)    #arg

Definition at line 60 of file compile-features.C.

#define XSTR (   arg)    STR(arg)

Definition at line 59 of file compile-features.C.

Function Documentation

bool check_for_required_arg ( int  argc,
int  i,
string  err_msg 
)

Definition at line 101 of file compile-features.C.

int main ( int  argc,
char **  argv 
)

Definition at line 112 of file compile-features.C.

usage ( )

Emits usage message to standard output.

Definition at line 93 of file compile-features.C.

Variable Documentation

const char* usage_msg[]
Initial value:
= {
"Usage:\n",
"compile-features" " -i|--input <candidate set input file>+\n",
"\t[-d|--decompile]\n",
"\t[--input-symbols <input symbol table>]\n",
"\t[--clear-raw]\n",
"\t[--max-examples <max num examples>]\n",
"\t[--max-candidates <max num candidates>]\n",
"\t[-r <reporting interval>]\n",
"where\n",
"\t<candidate set input file> is the name of a stream of serialized\n",
"\t\tCandidateSet instances, or \"-\" for input from standard input\n",
"\t<input symbol table> is an optional input file containing a Symbols\n",
"\t\tinstance serialized as a sequence of Symbol messages\n",
"\t-d|--decompile indicates to decompile features\n",
"\t--clear-raw specified to clear each Candidate of its raw data string\n",
"\t--max-examples specifies the maximum number of examples to read from\n",
"\t\tany input file (defaults to " "-1" ")\n",
"\t--max-candidates specifies the maximum number of candidates to read\n",
"\t\tfor any candidate set (defaults to " "-1" ")\n",
"\t-r specifies the interval at which the CandidateSetReader reports how\n",
"\t\tmany candidate sets it has read (defaults to "
"1000" ")\n",
}

Definition at line 66 of file compile-features.C.