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::CandidateSetWriter Class Reference

A class for writing streams of training or test instances, where each training or test instance is a reranker::CandidateSet object. More...

#include <candidate-set-writer.H>

Public Member Functions

 CandidateSetWriter (long reporting_interval=1000)
 Constructs a new insta. More...
 
virtual ~CandidateSetWriter ()
 
void Open (const string &filename, bool compressed, bool use_base64)
 
void Write (vector< shared_ptr< CandidateSet > > &examples, const string &filename, bool compressed, bool use_base64)
 Writes a stream of CandidateSet instances to the specified file or to standard output. More...
 
bool WriteNext (const CandidateSet &candidate_set)
 
void Close ()
 
void Reset ()
 Resets this writer so that its internal count of the number of CandidateSet’s written goes back to zero. More...
 
void set_verbosity (int verbosity)
 Sets the verbosity of this writer (mostly for debugging purposes). More...
 
void set_max_num_to_write (int max_num_to_write)
 

Detailed Description

A class for writing streams of training or test instances, where each training or test instance is a reranker::CandidateSet object.

Definition at line 62 of file candidate-set-writer.H.

Constructor & Destructor Documentation

reranker::CandidateSetWriter::CandidateSetWriter ( long  reporting_interval = 1000)
inline

Constructs a new insta.

Definition at line 65 of file candidate-set-writer.H.

virtual reranker::CandidateSetWriter::~CandidateSetWriter ( )
inlinevirtual

Definition at line 72 of file candidate-set-writer.H.

Member Function Documentation

void reranker::CandidateSetWriter::Close ( )
inline

Definition at line 149 of file candidate-set-writer.H.

void reranker::CandidateSetWriter::Open ( const string &  filename,
bool  compressed,
bool  use_base64 
)
inline

Definition at line 74 of file candidate-set-writer.H.

void reranker::CandidateSetWriter::Reset ( )
inline

Resets this writer so that its internal count of the number of CandidateSet’s written goes back to zero.

Definition at line 156 of file candidate-set-writer.H.

void reranker::CandidateSetWriter::set_max_num_to_write ( int  max_num_to_write)
inline

Definition at line 174 of file candidate-set-writer.H.

void reranker::CandidateSetWriter::set_verbosity ( int  verbosity)
inline

Sets the verbosity of this writer (mostly for debugging purposes).

There are currently four levels:

LevelMeaning
0 None
1 Basic output
2 Very verbose output
3 Extremely verbose output
Parameters
verbositythe new verbosity level for this writer to have

Definition at line 172 of file candidate-set-writer.H.

void reranker::CandidateSetWriter::Write ( vector< shared_ptr< CandidateSet > > &  examples,
const string &  filename,
bool  compressed,
bool  use_base64 
)
inline

Writes a stream of CandidateSet instances to the specified file or to standard output.

Parameters
[in]examplesthe vector of pointers to CandidateSet instances to write out
[in]filenamethe filename to which to write; specify "-" to write to standard output
[in]compressedwhether the output stream is compressed
[in]use_base64whether to use base64 encoding

Definition at line 98 of file candidate-set-writer.H.

bool reranker::CandidateSetWriter::WriteNext ( const CandidateSet candidate_set)
inline

Definition at line 115 of file candidate-set-writer.H.


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