Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
reranker::MultiFileCandidateSetIterator Class Reference

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>

Inheritance diagram for reranker::MultiFileCandidateSetIterator:
reranker::CandidateSetIterator

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 CandidateSetNext ()
 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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

reranker::MultiFileCandidateSetIterator::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 
)
inline

Constructs a new instance that iterates over the CandidateSet instances serialized in the specified sequence of files.

Parameters
filesthe sequence of files containing serialized CandidateSet instances
efea 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_examplesthe 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_candidatesthe 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_intervalthe number of CandidateSet instances read after which a message will be issued to cerr
verbositythe verbosity level of this instance and its underlying objects (see CandidateSetReader::set_verbosity)
compressedwhether the files containing serialized CandidateSet instances are compressed
use_base64whether the files containing serialized CandidateSet instances use base64 encoding

Definition at line 151 of file candidate-set-iterator.H.

Member Function Documentation

const string reranker::MultiFileCandidateSetIterator::curr_file ( ) const
inline

Definition at line 185 of file candidate-set-iterator.H.

virtual bool reranker::MultiFileCandidateSetIterator::HasNext ( ) const
inlinevirtual

Returns whether this iterator contains another CandidateSet.

Implements reranker::CandidateSetIterator.

Definition at line 173 of file candidate-set-iterator.H.

virtual CandidateSet& reranker::MultiFileCandidateSetIterator::Next ( )
inlinevirtual

Returns the next CandidateSet.

Implements reranker::CandidateSetIterator.

Definition at line 178 of file candidate-set-iterator.H.

virtual void reranker::MultiFileCandidateSetIterator::Reset ( )
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.


The documentation for this class was generated from the following file: