Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
|
Reranker model interface. More...
#include <stdexcept>
#include <memory>
#include <vector>
#include "candidate-set.H"
#include "candidate-set-iterator.H"
#include "kernel-function.H"
#include "symbol-table.H"
#include "training-time.H"
#include "factory.H"
Go to the source code of this file.
Classes | |
class | reranker::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 | reranker::DefaultGoldComparator |
The default comparator for comparing two Candidate instances for being the “gold” candidate. More... | |
class | reranker::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 | reranker::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 | reranker::Model |
Model is an interface for reranking models. More... | |
class | reranker::Model::Hook |
An interface for specifying a hook to be run by a Model instance. More... | |
class | reranker::Model::UpdatePredicate |
An inner interface for a predicate that tests whether a Model needs to be updated based on the current training example. More... | |
class | reranker::Model::Updater |
An inner interface specifying an update function for a model. More... | |
Namespaces | |
reranker | |
Provides reranking models for discriminative modeling, with some special handling for discriminative language models. | |
Macros | |
#define | REGISTER_NAMED_MODEL(TYPE, NAME) REGISTER_NAMED(TYPE,NAME,Model) |
Registers the Model implementation with the specified subtype TYPE and NAME with the Model Factory. More... | |
#define | REGISTER_MODEL(TYPE) REGISTER_NAMED_MODEL(TYPE,TYPE) |
Registers the Model implementation with the specified subtype TYPE with the Model Factory. More... | |
#define | REGISTER_NAMED_MODEL_UPDATE_PREDICATE(TYPE, NAME) REGISTER_NAMED(TYPE,NAME,Model::UpdatePredicate) |
Registers the Model::UpdatePredicate implementation with the specified subtype TYPE and NAME with the Model::UpdatePredicate Factory. More... | |
#define | REGISTER_MODEL_UPDATE_PREDICATE(TYPE) REGISTER_NAMED_MODEL_UPDATE_PREDICATE(TYPE,TYPE) |
Registers the Model::UpdatePredicate implementation with the specified subtype TYPE with the Model::UpdatePredicate Factory. More... | |
#define | REGISTER_NAMED_MODEL_UPDATER(TYPE, NAME) REGISTER_NAMED(TYPE,NAME,Model::Updater) |
Registers the Model::Updater implementation with the specified subtype TYPE and NAME with the Model::Updater Factory. More... | |
#define | REGISTER_MODEL_UPDATER(TYPE) REGISTER_NAMED_MODEL_UPDATER(TYPE,TYPE) |
Registers the Model::Updater implementation with the specified subtype TYPE with the Model::Updater Factory. More... | |
Reranker model interface.
Definition in file model.H.
#define REGISTER_MODEL | ( | TYPE | ) | REGISTER_NAMED_MODEL(TYPE,TYPE) |
#define REGISTER_MODEL_UPDATE_PREDICATE | ( | TYPE | ) | REGISTER_NAMED_MODEL_UPDATE_PREDICATE(TYPE,TYPE) |
Registers the Model::UpdatePredicate implementation with the specified subtype TYPE
with the Model::UpdatePredicate Factory.
#define REGISTER_MODEL_UPDATER | ( | TYPE | ) | REGISTER_NAMED_MODEL_UPDATER(TYPE,TYPE) |
Registers the Model::Updater implementation with the specified subtype TYPE
with the Model::Updater Factory.
#define REGISTER_NAMED_MODEL | ( | TYPE, | |
NAME | |||
) | REGISTER_NAMED(TYPE,NAME,Model) |
#define REGISTER_NAMED_MODEL_UPDATE_PREDICATE | ( | TYPE, | |
NAME | |||
) | REGISTER_NAMED(TYPE,NAME,Model::UpdatePredicate) |
Registers the Model::UpdatePredicate implementation with the specified subtype TYPE
and NAME
with the Model::UpdatePredicate Factory.
#define REGISTER_NAMED_MODEL_UPDATER | ( | TYPE, | |
NAME | |||
) | REGISTER_NAMED(TYPE,NAME,Model::Updater) |
Registers the Model::Updater implementation with the specified subtype TYPE
and NAME
with the Model::Updater Factory.