Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
|
An implementation of the CandidateSetIterator interface that iterates over CandidateSet instances that have been serialized to CandidateSetMessage
protocol buffer messages in multiple files.
More...
#include <candidate-set-iterator.H>
Public Member Functions | |
MultiFileCandidateSetIterator (vector< string > files, shared_ptr< const ExecutiveFeatureExtractor > efe, int max_examples, int max_candidates, int reporting_interval, int verbosity, bool compressed, bool use_base64) | |
Constructs a new instance that iterates over the CandidateSet instances serialized in the specified sequence of files. More... | |
virtual bool | HasNext () const |
Returns whether this iterator contains another CandidateSet. More... | |
virtual CandidateSet & | Next () |
Returns the next CandidateSet. More... | |
const string | curr_file () const |
virtual void | Reset () |
Resets this multi-file candidate set iterator so that the next CandidateSet retrieved will be the first serialized instance in the first of the sequence of files with which this MultiFileCandidateSetIterator was constructed. More... | |
Public Member Functions inherited from reranker::CandidateSetIterator | |
virtual | ~CandidateSetIterator () |
An implementation of the CandidateSetIterator interface that iterates over CandidateSet instances that have been serialized to CandidateSetMessage
protocol buffer messages in multiple files.
The sequence of files containing serialized CandidateSet instances are specified at construction time.
Definition at line 112 of file candidate-set-iterator.H.
|
inline |
Constructs a new instance that iterates over the CandidateSet instances serialized in the specified sequence of files.
files | the sequence of files containing serialized CandidateSet instances |
efe | a pointer to an ExecutiveFeatureExtractor instance; if non-NULL , this iterator will invoke the ExecutiveFeatureExtractor::Extract on each CandidateSet instance returned by this iterator’s Next method |
max_examples | the maximum number of examples to be read from each file specified by the files parameter (as per the first parameter of the CandidateSetReader::CandidateSetReader(int,int,long) constructor) |
max_candidates | the maximum number of candidates to be read for each de-serialized CandidateSet instance (as per the second parameter of the CandidateSetReader::CandidateSetReader(int,int,long) constructor) |
reporting_interval | the number of CandidateSet instances read after which a message will be issued to cerr |
verbosity | the verbosity level of this instance and its underlying objects (see CandidateSetReader::set_verbosity) |
compressed | whether the files containing serialized CandidateSet instances are compressed |
use_base64 | whether the files containing serialized CandidateSet instances use base64 encoding |
Definition at line 151 of file candidate-set-iterator.H.
|
inline |
Definition at line 185 of file candidate-set-iterator.H.
|
inlinevirtual |
Returns whether this iterator contains another CandidateSet.
Implements reranker::CandidateSetIterator.
Definition at line 173 of file candidate-set-iterator.H.
|
inlinevirtual |
Returns the next CandidateSet.
Implements reranker::CandidateSetIterator.
Definition at line 178 of file candidate-set-iterator.H.
|
inlinevirtual |
Resets this multi-file candidate set iterator so that the next CandidateSet retrieved will be the first serialized instance in the first of the sequence of files with which this MultiFileCandidateSetIterator was constructed.
Implements reranker::CandidateSetIterator.
Definition at line 193 of file candidate-set-iterator.H.