Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
reranker Namespace Reference

Provides reranking models for discriminative modeling, with some special handling for discriminative language models. More...

Classes

class  AbstractFileBackedFeatureExtractor
 This class makes it easy for concrete subclasses to extract features based on input from a file. More...
 
class  BasicFileBackedFeatureExtractorConstructor
 
class  BasicFileBackedFeatureExtractor
 A class to read one line at a time from a backing file, and tokenize that line based on whitespace, and then interpret each token as a feature-value pair via a protected method ExtractFeatureValuePair (see the documentation for that method for details on how tokens are interpreted as feature-value pairs). More...
 
class  CandidateSetIterator
 An interface specifying iteration over CandidateSet instances, using Java-style semantics (sorry, die-hard C++ iterator fans). More...
 
class  CollectionCandidateSetIterator
 An implementation of the CandidateSetIterator interface that is backed by an arbitrary C++ collection of pointers to CandidateSet’s, where the collection’s iterators implement the ForwardIterator concept. More...
 
class  MultiFileCandidateSetIterator
 An implementation of the CandidateSetIterator interface that iterates over CandidateSet instances that have been serialized to CandidateSetMessage protocol buffer messages in multiple files. More...
 
class  CandidateSetProtoReader
 A class to fill in a CandidateSet based on a CandidateSetMessage, crucially constructing new Candidate instances from each CandidateMessage inside the CandidateSetMessage. More...
 
class  CandidateSetProtoWriter
 A class to construct a CandidateSetMessage from a CandidateSet instance. More...
 
class  CandidateSetReader
 A class for reading streams of training or test instances, where each training or test instance is a reranker::CandidateSet object. More...
 
class  CandidateSetWriter
 A class for writing streams of training or test instances, where each training or test instance is a reranker::CandidateSet object. More...
 
class  CandidateSet
 A class to hold a set of candidates, either for training or test. More...
 
class  Candidate
 A class to represent a candidate in a set of candidates that constitutes a training instance for a reranker. More...
 
class  DotProduct
 This class defines a dot product kernel function for two vectors. More...
 
class  EnvironmentImpl
 Provides a set of named variables and their types, as well as the values for those variables. More...
 
class  VarMapBase
 A base class for a mapping from variables of a specific type to their values. More...
 
class  Environment
 An interface for an environment in which variables of various types are mapped to their values. More...
 
class  ValueString
 A template class that helps print out values with ostream& operator support and vectors of those values. More...
 
class  ValueString< string >
 A specialization of the ValueString class to support printing of string values. More...
 
class  ValueString< bool >
 A partial specialization of the ValueString class to support printing of boolean values. More...
 
class  ValueString< shared_ptr< T > >
 A partial specialization of the ValueString class to support printing of shared_ptr's to objects, where we simply print the typeid name followed by a colon character followed by the pointer address. More...
 
class  ValueString< vector< T > >
 A partial specialization of the ValueString class to support printing of vectors of values. More...
 
class  VarMap
 A container to hold the mapping between named variables of a specific type and their values. More...
 
class  ExampleFeatureExtractor
 This class illustrates how to write a FeatureExtractor implementation. More...
 
class  ExampleFeatureExtractorConstructor
 
class  ExecutiveFeatureExtractorImplConstructor
 
class  ExecutiveFeatureExtractor
 This class is like a regular FeatureExtractor, but has been promoted to the executive level and thus wears fancypants. More...
 
class  ExecutiveFeatureExtractorImpl
 
class  TypeName
 We use the templated class TypeName to be able to take an actual C++ type and get the type name string used by the Interpreter and Environment classes. More...
 
class  TypeName< bool >
 A partial specialization so that an object of type bool converts to "bool". More...
 
class  TypeName< int >
 A partial specialization so that an object of type int converts to "int". More...
 
class  TypeName< double >
 A partial specialization so that an object of type double converts to "double". More...
 
class  TypeName< string >
 A partial specialization so that an object of type string converts to "string". More...
 
class  TypeName< shared_ptr< T > >
 A partial specialization so that an object of type shared_ptr<T>, where T is some Factory-constructible type, converts to the string produced by TypeName<T>. More...
 
class  TypeName< vector< T > >
 A partial specialization so that an object of type vector<T> gets converted to the type name of T followed by the string "[]", equivalent to the result of executing the following expression: More...
 
class  MemberInitializer
 An interface for initializers of members of a Factory-constructible object. More...
 
class  TypedMemberInitializer
 
class  Initializers
 A container for all the member initializers for a particular Factory-constructible instance. More...
 
class  FactoryBase
 An interface for all Factory instances, specifying a few pure virtual methods. More...
 
class  FactoryContainer
 A class to hold all Factory instances that have been created. More...
 
class  Constructor
 An interface with a single virtual method that constructs a concrete instance of the abstract type T. More...
 
class  FactoryConstructible
 An interface to make it easier to implement Factory-constructible types by implementing both required methods to do nothing. More...
 
class  Factory
 Factory for dynamically created instance of the specified type. More...
 
class  FeatureExtractor
 An abstract base class/interface for all feature extractors. More...
 
class  FeatureVectorReader
 A class to de-serialize FeatureVector instances from FeatureVecMessage instances. More...
 
class  FeatureVectorReader< FeatureVector< string, V > >
 Partial specialization of the FeatureVectorReader class for feature vectors whose unique identifiers for features are string objects. More...
 
class  FeatureVectorWriter
 A class to serialize FeatureVector instances to FeatureVecMessage instances. More...
 
class  FeatureVectorWriter< FeatureVector< string, V > >
 Partial specialization of the FeatureVectorWriter class for feature vectors whose unique identifiers for features are string objects. More...
 
struct  DelKey
 
struct  DelKey< int >
 
struct  DelKey< double >
 
struct  DelKey< string >
 
class  UidGetter
 A simple class that provides a layer of abstraction when retrieving objects to represent unique identifiers for features. More...
 
struct  UidGetter< string >
 A specialization for when feature uid’s are string objects, where StringCanonicalizer::Get is used to provide a canonical string instance. More...
 
class  FeatureVector
 A class to represent a feature vector, where features are represented by unique identifiers, and feature values are represented by the template type. More...
 
class  FileBackedLossSetterConstructor
 
class  FileBackedLossSetter
 A “feature extractor” that reads lines from a backing file, setting each candidate’s loss via its Candidate::set_loss method. More...
 
class  FileBackedNgramFeatureExtractorConstructor
 
class  FileBackedNgramFeatureExtractor
 A class to read one line at a time from backing file, and tokenize that line based on whitespace, and then extract n-gram features from that token stream. More...
 
class  Interpreter
 Provides an interpreter for assigning primitives and Factory-constructible objects to named variables, as well as vectors thereof. More...
 
class  KernelFunction
 An interface specifying a kernel function for two FeatureVector instances. More...
 
class  DirectLossScoreComparatorConstructor
 
class  MiraStyleModelConstructor
 
class  DirectLossScoreComparator
 A class to do “direct loss minimization” by considering the score of a candidate to be its raw score plus its loss insofar as candidate ordering is concerned. More...
 
class  MiraStyleModel
 A subclass of PerceptronModel that differs only in the way that the ComputeStepSize method is implemented. More...
 
class  Reducer
 Abstract base-class for a streaming reducer. More...
 
class  FeatureReducer
 A reducer class which processes FeatureMessage proto buffers. More...
 
class  ModelInfoReducer
 A reducer class which processes ModelMessage protocol messages and merges them into a single message. More...
 
class  SymbolReducer
 A reducer class which processes SymbolMessage messages and returns a set of unique them into a single message. More...
 
class  ModelProtoReader
 A class to de-serialize a Model instance from a ModelMessage instance. More...
 
class  ModelProtoWriter
 A class to construct a ModelMessage from a Model instance. More...
 
class  EndOfEpochModelWriter
 An end-of-epoch hook for writing out the best model so far to file after each epoch (if the best model changes from the last time it was written out). More...
 
class  ModelReader
 Knows how to create Model instances that have been serialized to a file. More...
 
class  DefaultScoreComparatorConstructor
 
class  DefaultGoldComparatorConstructor
 
class  DefaultCandidateSetScorerConstructor
 
class  RandomPairCandidateSetScorerConstructor
 
class  DefaultScoreComparator
 The default comparator for comparing two Candidate instances based on their respective scores (i.e., the values returned by invoking their Candidate::score methods). More...
 
class  DefaultGoldComparator
 The default comparator for comparing two Candidate instances for being the “gold” candidate. More...
 
class  DefaultCandidateSetScorer
 The default candidate set scorer scores each candidate using the Model::ScoreCandidate method and then sets the index of the best-scoring candidate based on the results of having applied the Model::score_comparator and sets the index of the gold candidate based on the results of having applied the Model::gold_comparator. More...
 
class  RandomPairCandidateSetScorer
 This candidate set scorer picks two candidates at random from the set, scores them and then identifies which has the higher score and the lowest loss, effectively meaning that training proceeds as if those were the only two candidates. More...
 
class  Model
 Model is an interface for reranking models. More...
 
class  NgramFeatureExtractorConstructor
 
class  NgramExtractor
 Extracts n-gram features from an arbitrary vector of string tokens. More...
 
class  NgramFeatureExtractor
 Extracts n-gram features for candidate hypotheses on the fly. More...
 
class  PerceptronModelProtoReaderConstructor
 
class  PerceptronModelProtoReader
 A class to construct a PerceptronModel from a ModelMessage instance. More...
 
class  PerceptronModelProtoWriterConstructor
 
class  PerceptronModelProtoWriter
 A class to construct a ModelMessage from a PerceptronModel instance. More...
 
class  PerceptronModelConstructor
 
class  PerceptronModelDefaultUpdatePredicateConstructor
 
class  PerceptronModelDefaultUpdaterConstructor
 
class  PerceptronModel
 This class implements a perceptron model reranker. More...
 
class  RankFeatureExtractorConstructor
 
class  RankFeatureExtractor
 Encodes the baseline rank as a boolean feature. More...
 
class  StreamInitializer
 An interface that allows for a primitive, Factory-constructible object or vector thereof to be initialized based on the next token or tokens from a token stream. More...
 
class  Initializer
 A class to initialize a Factory-constructible object. More...
 
class  Initializer< int >
 A specialization to allow Factory-constructible objects to initialize int data members. More...
 
class  Initializer< double >
 A specialization to initialize double data members. More...
 
class  Initializer< bool >
 A specialization to initialize bool data members. More...
 
class  Initializer< string >
 A specialization to initialize string data members. More...
 
class  Initializer< vector< T > >
 A partial specialization to allow initialization of a vector of any primitive type or any Factory-constructible type. More...
 
class  StreamTokenizer
 A simple class for tokenizing a stream of tokens for the formally specified language used to construct objects for the Reranker framework. More...
 
class  StringCanonicalizer
 A class that stores a canonical version of string objects in a static data structure. More...
 
class  Symbols
 An interface specifying a converter from symbols (strings) to int indices. More...
 
class  StaticSymbolTable
 A converter from symbols (strings) to int indices. More...
 
class  LocalSymbolTable
 A symbol table that stores the mapping from symbols to int’s and vice versa in local (non-static) data structures. More...
 
class  Tokenizer
 A very simple tokenizer class. More...
 
class  Time
 A simple class to hold the three notions of time during training: the current epoch, the current time index within the current epoch, and the absolute time index. More...
 
class  TrainingVectorSet
 A class to hold the several feature vectors needed during training (especially for the perceptron family of algorithms), as well as for performing the updates to those feature vectors (again, with the perceptron family of algorithms in mind). More...
 

Functions

void TearDown ()
 A free-floating function (within the reranker namespace) that frees statically allocated objects. More...
 

Variables

const Constructor
< FeatureExtractor > * 
BasicFileBackedFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("BasicFileBackedFeatureExtractor"), new BasicFileBackedFeatureExtractorConstructor())
 
const Constructor
< FeatureExtractor > * 
ExampleFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("ExampleFeatureExtractor"), new ExampleFeatureExtractorConstructor())
 
const Constructor
< ExecutiveFeatureExtractor > * 
ExecutiveFeatureExtractorImpl_my_protoype = Factory< ExecutiveFeatureExtractor >::Register(string("ExecutiveFeatureExtractorImpl"), new ExecutiveFeatureExtractorImplConstructor())
 
const Constructor
< FeatureExtractor > * 
FileBackedLossSetter_my_protoype = Factory< FeatureExtractor >::Register(string("FileBackedLossSetter"), new FileBackedLossSetterConstructor())
 
const Constructor
< FeatureExtractor > * 
FileBackedNgramFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("FileBackedNgramFeatureExtractor"), new FileBackedNgramFeatureExtractorConstructor())
 
const Constructor
< Candidate::Comparator > * 
DirectLossScoreComparator_my_protoype = Factory< Candidate::Comparator >::Register(string("DirectLossScoreComparator"), new DirectLossScoreComparatorConstructor())
 
const Constructor< Model > * MiraStyleModel_my_protoype = Factory< Model >::Register(string("MiraStyleModel"), new MiraStyleModelConstructor())
 
const Constructor
< Candidate::Comparator > * 
DefaultScoreComparator_my_protoype = Factory< Candidate::Comparator >::Register(string("DefaultScoreComparator"), new DefaultScoreComparatorConstructor())
 
const Constructor
< Candidate::Comparator > * 
DefaultGoldComparator_my_protoype = Factory< Candidate::Comparator >::Register(string("DefaultGoldComparator"), new DefaultGoldComparatorConstructor())
 
const Constructor
< CandidateSet::Scorer > * 
DefaultCandidateSetScorer_my_protoype = Factory< CandidateSet::Scorer >::Register(string("DefaultCandidateSetScorer"), new DefaultCandidateSetScorerConstructor())
 
const Constructor
< CandidateSet::Scorer > * 
RandomPairCandidateSetScorer_my_protoype = Factory< CandidateSet::Scorer >::Register(string("RandomPairCandidateSetScorer"), new RandomPairCandidateSetScorerConstructor())
 
const Constructor
< FeatureExtractor > * 
NgramFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("NgramFeatureExtractor"), new NgramFeatureExtractorConstructor())
 
const Constructor
< ModelProtoReader > * 
PerceptronModelProtoReader_my_protoype = Factory< ModelProtoReader >::Register(string("PerceptronModelProtoReader"), new PerceptronModelProtoReaderConstructor())
 
const Constructor
< ModelProtoWriter > * 
PerceptronModelProtoWriter_my_protoype = Factory< ModelProtoWriter >::Register(string("PerceptronModelProtoWriter"), new PerceptronModelProtoWriterConstructor())
 
const Constructor< Model > * PerceptronModel_my_protoype = Factory< Model >::Register(string("PerceptronModel"), new PerceptronModelConstructor())
 
const Constructor
< Model::UpdatePredicate > * 
PerceptronModelDefaultUpdatePredicate_my_protoype = Factory< Model::UpdatePredicate >::Register(string("PerceptronModelDefaultUpdatePredicate"), new PerceptronModelDefaultUpdatePredicateConstructor())
 
const Constructor
< Model::Updater > * 
PerceptronModelDefaultUpdater_my_protoype = Factory< Model::Updater >::Register(string("PerceptronModelDefaultUpdater"), new PerceptronModelDefaultUpdaterConstructor())
 
const Constructor
< FeatureExtractor > * 
RankFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("RankFeatureExtractor"), new RankFeatureExtractorConstructor())
 

Detailed Description

Provides reranking models for discriminative modeling, with some special handling for discriminative language models.

Function Documentation

void reranker::TearDown ( )

A free-floating function (within the reranker namespace) that frees statically allocated objects.

Definition at line 42 of file feature-extractor.C.

Variable Documentation

const Constructor< FeatureExtractor >* reranker::BasicFileBackedFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("BasicFileBackedFeatureExtractor"), new BasicFileBackedFeatureExtractorConstructor())

Definition at line 40 of file basic-file-backed-feature-extractor.C.

const Constructor< CandidateSet::Scorer >* reranker::DefaultCandidateSetScorer_my_protoype = Factory< CandidateSet::Scorer >::Register(string("DefaultCandidateSetScorer"), new DefaultCandidateSetScorerConstructor())

Definition at line 57 of file model.C.

const Constructor< Candidate::Comparator >* reranker::DefaultGoldComparator_my_protoype = Factory< Candidate::Comparator >::Register(string("DefaultGoldComparator"), new DefaultGoldComparatorConstructor())

Definition at line 55 of file model.C.

const Constructor< Candidate::Comparator >* reranker::DefaultScoreComparator_my_protoype = Factory< Candidate::Comparator >::Register(string("DefaultScoreComparator"), new DefaultScoreComparatorConstructor())

Definition at line 54 of file model.C.

const Constructor< Candidate::Comparator >* reranker::DirectLossScoreComparator_my_protoype = Factory< Candidate::Comparator >::Register(string("DirectLossScoreComparator"), new DirectLossScoreComparatorConstructor())

Definition at line 41 of file mira-style-model.C.

const Constructor< FeatureExtractor >* reranker::ExampleFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("ExampleFeatureExtractor"), new ExampleFeatureExtractorConstructor())

Definition at line 138 of file example-feature-extractor.H.

const Constructor< ExecutiveFeatureExtractor >* reranker::ExecutiveFeatureExtractorImpl_my_protoype = Factory< ExecutiveFeatureExtractor >::Register(string("ExecutiveFeatureExtractorImpl"), new ExecutiveFeatureExtractorImplConstructor())

Definition at line 63 of file executive-feature-extractor.C.

const Constructor< FeatureExtractor >* reranker::FileBackedLossSetter_my_protoype = Factory< FeatureExtractor >::Register(string("FileBackedLossSetter"), new FileBackedLossSetterConstructor())

Definition at line 43 of file file-backed-loss-setter.C.

const Constructor< FeatureExtractor >* reranker::FileBackedNgramFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("FileBackedNgramFeatureExtractor"), new FileBackedNgramFeatureExtractorConstructor())

Definition at line 40 of file file-backed-ngram-feature-extractor.C.

const Constructor< Model >* reranker::MiraStyleModel_my_protoype = Factory< Model >::Register(string("MiraStyleModel"), new MiraStyleModelConstructor())

Definition at line 43 of file mira-style-model.C.

const Constructor< FeatureExtractor >* reranker::NgramFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("NgramFeatureExtractor"), new NgramFeatureExtractorConstructor())

Definition at line 42 of file ngram-feature-extractor.C.

const Constructor< Model >* reranker::PerceptronModel_my_protoype = Factory< Model >::Register(string("PerceptronModel"), new PerceptronModelConstructor())

Definition at line 54 of file perceptron-model.C.

const Constructor< Model::UpdatePredicate >* reranker::PerceptronModelDefaultUpdatePredicate_my_protoype = Factory< Model::UpdatePredicate >::Register(string("PerceptronModelDefaultUpdatePredicate"), new PerceptronModelDefaultUpdatePredicateConstructor())

Definition at line 57 of file perceptron-model.C.

const Constructor< Model::Updater >* reranker::PerceptronModelDefaultUpdater_my_protoype = Factory< Model::Updater >::Register(string("PerceptronModelDefaultUpdater"), new PerceptronModelDefaultUpdaterConstructor())

Definition at line 60 of file perceptron-model.C.

const Constructor< ModelProtoReader >* reranker::PerceptronModelProtoReader_my_protoype = Factory< ModelProtoReader >::Register(string("PerceptronModelProtoReader"), new PerceptronModelProtoReaderConstructor())

Definition at line 47 of file perceptron-model-proto-reader.C.

const Constructor< ModelProtoWriter >* reranker::PerceptronModelProtoWriter_my_protoype = Factory< ModelProtoWriter >::Register(string("PerceptronModelProtoWriter"), new PerceptronModelProtoWriterConstructor())

Definition at line 44 of file perceptron-model-proto-writer.C.

const Constructor< CandidateSet::Scorer >* reranker::RandomPairCandidateSetScorer_my_protoype = Factory< CandidateSet::Scorer >::Register(string("RandomPairCandidateSetScorer"), new RandomPairCandidateSetScorerConstructor())

Definition at line 58 of file model.C.

const Constructor< FeatureExtractor >* reranker::RankFeatureExtractor_my_protoype = Factory< FeatureExtractor >::Register(string("RankFeatureExtractor"), new RankFeatureExtractorConstructor())

Definition at line 40 of file rank-feature-extractor.C.