Moses::IOWrapper Class Reference

#include <IOWrapper.h>

Collaboration diagram for Moses::IOWrapper:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 IOWrapper (AllOptions const &opts)
 ~IOWrapper ()
boost::shared_ptr< InputTypeReadInput (boost::shared_ptr< std::vector< std::string > > *cw=NULL)
Moses::OutputCollectorGetSingleBestOutputCollector ()
void SetOutputStream2SingleBestOutputCollector (std::ostream *outStream)
Moses::OutputCollectorGetNBestOutputCollector ()
Moses::OutputCollectorGetUnknownsCollector ()
Moses::OutputCollectorGetAlignmentInfoCollector ()
Moses::OutputCollectorGetSearchGraphOutputCollector ()
Moses::OutputCollectorGetDetailedTranslationCollector ()
Moses::OutputCollectorGetWordGraphCollector ()
Moses::OutputCollectorGetLatticeSamplesCollector ()
Moses::OutputCollectorGetDetailTreeFragmentsOutputCollector ()
void SetInputStreamFromString (std::istringstream &input)
std::string GetHypergraphOutputFileName (size_t const id) const
std::list< boost::shared_ptr
< InputType > > const & 
GetPastInput () const
std::list< boost::shared_ptr
< InputType > > const & 
GetFutureInput () const
size_t GetLookAhead () const
size_t GetLookBack () const

Public Attributes

std::ifstream * spe_src
std::ifstream * spe_trg
std::ifstream * spe_aln

Protected Attributes

boost::shared_ptr< AllOptions
const > 
m_options
const std::vector
< Moses::FactorType > * 
m_inputFactorOrder
std::string m_inputFilePath
Moses::InputFileStreamm_inputFile
std::istream * m_inputStream
std::ostream * m_nBestStream
std::ostream * m_unknownsStream
std::ofstream * m_alignmentInfoStream
std::ofstream * m_latticeSamplesStream
std::auto_ptr
< Moses::OutputCollector
m_singleBestOutputCollector
std::auto_ptr
< Moses::OutputCollector
m_nBestOutputCollector
std::auto_ptr
< Moses::OutputCollector
m_unknownsCollector
std::auto_ptr
< Moses::OutputCollector
m_alignmentInfoCollector
std::auto_ptr
< Moses::OutputCollector
m_searchGraphOutputCollector
std::auto_ptr
< Moses::OutputCollector
m_detailedTranslationCollector
std::auto_ptr
< Moses::OutputCollector
m_wordGraphCollector
std::auto_ptr
< Moses::OutputCollector
m_latticeSamplesCollector
std::auto_ptr
< Moses::OutputCollector
m_detailTreeFragmentsOutputCollector
bool m_surpressSingleBestOutput
size_t m_currentLine
InputTypeEnum m_inputType
std::list< boost::shared_ptr
< InputType > > 
m_past_input
std::list< boost::shared_ptr
< InputType > > 
m_future_input
size_t m_look_ahead
size_t m_look_back
 for context-sensitive decoding: # of wrds to look ahead
size_t m_buffered_ahead
 for context-sensitive decoding: # of wrds to look back
std::string m_hypergraph_output_filepattern
 number of words buffered ahead


Detailed Description

Helper class that holds misc variables to write data out to command line.

Definition at line 83 of file IOWrapper.h.


Constructor & Destructor Documentation

Moses::IOWrapper::IOWrapper ( AllOptions const &  opts  ) 

Moses::IOWrapper::~IOWrapper (  ) 

Definition at line 170 of file IOWrapper.cpp.

References m_inputFile, and NULL.


Member Function Documentation

Moses::OutputCollector* Moses::IOWrapper::GetAlignmentInfoCollector (  )  [inline]

Definition at line 157 of file IOWrapper.h.

References m_alignmentInfoCollector.

Moses::OutputCollector* Moses::IOWrapper::GetDetailedTranslationCollector (  )  [inline]

Definition at line 165 of file IOWrapper.h.

References m_detailedTranslationCollector.

Moses::OutputCollector* Moses::IOWrapper::GetDetailTreeFragmentsOutputCollector (  )  [inline]

Definition at line 177 of file IOWrapper.h.

References m_detailTreeFragmentsOutputCollector.

std::list<boost::shared_ptr<InputType> > const& Moses::IOWrapper::GetFutureInput (  )  const [inline]

Definition at line 194 of file IOWrapper.h.

References m_future_input.

std::string Moses::IOWrapper::GetHypergraphOutputFileName ( size_t const   id  )  const

Definition at line 265 of file IOWrapper.cpp.

References m_hypergraph_output_filepattern, and str.

Moses::OutputCollector* Moses::IOWrapper::GetLatticeSamplesCollector (  )  [inline]

Definition at line 173 of file IOWrapper.h.

References m_latticeSamplesCollector.

size_t Moses::IOWrapper::GetLookAhead (  )  const [inline]

Definition at line 197 of file IOWrapper.h.

References m_look_ahead.

size_t Moses::IOWrapper::GetLookBack (  )  const [inline]

Definition at line 201 of file IOWrapper.h.

References m_look_back.

Moses::OutputCollector* Moses::IOWrapper::GetNBestOutputCollector (  )  [inline]

Definition at line 149 of file IOWrapper.h.

References m_nBestOutputCollector.

std::list<boost::shared_ptr<InputType> > const& Moses::IOWrapper::GetPastInput (  )  const [inline]

Definition at line 190 of file IOWrapper.h.

References m_past_input.

Moses::OutputCollector* Moses::IOWrapper::GetSearchGraphOutputCollector (  )  [inline]

Definition at line 161 of file IOWrapper.h.

References m_searchGraphOutputCollector.

Moses::OutputCollector* Moses::IOWrapper::GetSingleBestOutputCollector (  )  [inline]

Definition at line 138 of file IOWrapper.h.

References m_singleBestOutputCollector.

Moses::OutputCollector* Moses::IOWrapper::GetUnknownsCollector (  )  [inline]

Definition at line 153 of file IOWrapper.h.

References m_unknownsCollector.

Moses::OutputCollector* Moses::IOWrapper::GetWordGraphCollector (  )  [inline]

Definition at line 169 of file IOWrapper.h.

References m_wordGraphCollector.

boost::shared_ptr< InputType > Moses::IOWrapper::ReadInput ( boost::shared_ptr< std::vector< std::string > > *  cw = NULL  ) 

Definition at line 225 of file IOWrapper.cpp.

References m, m_currentLine, m_look_back, and m_past_input.

void Moses::IOWrapper::SetInputStreamFromString ( std::istringstream &  input  )  [inline]

Definition at line 181 of file IOWrapper.h.

References m_inputStream.

void Moses::IOWrapper::SetOutputStream2SingleBestOutputCollector ( std::ostream *  outStream  )  [inline]

Definition at line 142 of file IOWrapper.h.

References m_singleBestOutputCollector.


Member Data Documentation

Definition at line 103 of file IOWrapper.h.

Referenced by GetAlignmentInfoCollector(), and IOWrapper().

std::ofstream* Moses::IOWrapper::m_alignmentInfoStream [protected]

Definition at line 97 of file IOWrapper.h.

for context-sensitive decoding: # of wrds to look back

Definition at line 123 of file IOWrapper.h.

size_t Moses::IOWrapper::m_currentLine [protected]

Definition at line 115 of file IOWrapper.h.

Referenced by IOWrapper(), and ReadInput().

Definition at line 105 of file IOWrapper.h.

Referenced by GetDetailedTranslationCollector(), and IOWrapper().

Definition at line 108 of file IOWrapper.h.

Referenced by GetDetailTreeFragmentsOutputCollector(), and IOWrapper().

std::list<boost::shared_ptr<InputType> > Moses::IOWrapper::m_future_input [protected]

Definition at line 120 of file IOWrapper.h.

Referenced by GetFutureInput().

number of words buffered ahead

Definition at line 127 of file IOWrapper.h.

Referenced by GetHypergraphOutputFileName(), and IOWrapper().

Definition at line 87 of file IOWrapper.h.

Referenced by IOWrapper().

Definition at line 89 of file IOWrapper.h.

Referenced by IOWrapper(), and ~IOWrapper().

std::string Moses::IOWrapper::m_inputFilePath [protected]

Definition at line 88 of file IOWrapper.h.

Referenced by IOWrapper().

std::istream* Moses::IOWrapper::m_inputStream [protected]

Definition at line 90 of file IOWrapper.h.

Referenced by IOWrapper(), and SetInputStreamFromString().

Definition at line 118 of file IOWrapper.h.

Referenced by IOWrapper().

Definition at line 107 of file IOWrapper.h.

Referenced by GetLatticeSamplesCollector(), and IOWrapper().

std::ofstream* Moses::IOWrapper::m_latticeSamplesStream [protected]

Definition at line 98 of file IOWrapper.h.

size_t Moses::IOWrapper::m_look_ahead [protected]

Definition at line 121 of file IOWrapper.h.

Referenced by GetLookAhead(), and IOWrapper().

size_t Moses::IOWrapper::m_look_back [protected]

for context-sensitive decoding: # of wrds to look ahead

Definition at line 122 of file IOWrapper.h.

Referenced by GetLookBack(), IOWrapper(), and ReadInput().

Definition at line 101 of file IOWrapper.h.

Referenced by GetNBestOutputCollector(), and IOWrapper().

std::ostream* Moses::IOWrapper::m_nBestStream [protected]

Definition at line 91 of file IOWrapper.h.

boost::shared_ptr<AllOptions const> Moses::IOWrapper::m_options [protected]

Definition at line 86 of file IOWrapper.h.

Referenced by IOWrapper().

std::list<boost::shared_ptr<InputType> > Moses::IOWrapper::m_past_input [protected]

Definition at line 119 of file IOWrapper.h.

Referenced by GetPastInput(), and ReadInput().

Definition at line 104 of file IOWrapper.h.

Referenced by GetSearchGraphOutputCollector(), and IOWrapper().

Definition at line 110 of file IOWrapper.h.

Referenced by IOWrapper().

Definition at line 102 of file IOWrapper.h.

Referenced by GetUnknownsCollector(), and IOWrapper().

std::ostream* Moses::IOWrapper::m_unknownsStream [protected]

Definition at line 95 of file IOWrapper.h.

Definition at line 106 of file IOWrapper.h.

Referenced by GetWordGraphCollector(), and IOWrapper().

std::ifstream * Moses::IOWrapper::spe_aln

Definition at line 188 of file IOWrapper.h.

Referenced by IOWrapper().

std::ifstream* Moses::IOWrapper::spe_src

Definition at line 188 of file IOWrapper.h.

Referenced by IOWrapper().

std::ifstream * Moses::IOWrapper::spe_trg

Definition at line 188 of file IOWrapper.h.

Referenced by IOWrapper().


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

Generated on Thu Jul 6 00:33:19 2017 for Moses by  doxygen 1.5.9