#include <iostream>#include <stack>#include "TypeDef.h"#include "Util.h"#include "IOWrapper.h"#include "Hypothesis.h"#include "WordsRange.h"#include "TrellisPathList.h"#include "StaticData.h"#include "DummyScoreProducers.h"#include "InputFileStream.h"Go to the source code of this file.
Functions | |
| void | OutputSurface (std::ostream &out, const Phrase &phrase, const std::vector< FactorType > &outputFactorOrder, bool reportAllFactors) |
| void | OutputAlignment (ostream &out, const AlignmentInfo &ai, size_t sourceOffset, size_t targetOffset) |
| void | OutputAlignment (ostream &out, const vector< const Hypothesis * > &edges) |
| void | OutputAlignment (OutputCollector *collector, size_t lineNo, const vector< const Hypothesis * > &edges) |
| void | OutputAlignment (OutputCollector *collector, size_t lineNo, const Hypothesis *hypo) |
| void | OutputAlignment (OutputCollector *collector, size_t lineNo, const TrellisPath &path) |
| void | OutputSurface (std::ostream &out, const Hypothesis *hypo, const std::vector< FactorType > &outputFactorOrder, bool reportSegmentation, bool reportAllFactors) |
| void | OutputBestHypo (const Moses::TrellisPath &path, long, bool reportSegmentation, bool reportAllFactors, std::ostream &out) |
| void | OutputBestHypo (const std::vector< Word > &mbrBestHypo, long, bool, bool, ostream &out) |
| void | OutputInput (std::vector< const Phrase * > &map, const Hypothesis *hypo) |
| void | OutputInput (std::ostream &os, const Hypothesis *hypo) |
| void | OutputNBest (std::ostream &out, const Moses::TrellisPathList &nBestList, const std::vector< Moses::FactorType > &outputFactorOrder, const TranslationSystem *system, long translationId) |
| void | OutputLatticeMBRNBest (std::ostream &out, const vector< LatticeMBRSolution > &solutions, long translationId) |
| bool | ReadInput (IOWrapper &ioWrapper, InputTypeEnum inputType, InputType *&source) |
| IOWrapper * | GetIODevice (const StaticData &staticData) |
| IOWrapper* GetIODevice | ( | const StaticData & | staticData | ) |
Definition at line 549 of file IOWrapper.cpp.
References Moses::StaticData::GetInputFactorOrder(), Moses::StaticData::GetNBestFilePath(), Moses::StaticData::GetNBestSize(), Moses::StaticData::GetOutputFactorOrder(), Moses::StaticData::GetParam(), IFVERBOSE, Moses::PrintUserTime(), IOWrapper::ResetTranslationId(), and VERBOSE.
Referenced by main().


| void OutputAlignment | ( | OutputCollector * | collector, | |
| size_t | lineNo, | |||
| const TrellisPath & | path | |||
| ) |
Definition at line 260 of file IOWrapper.cpp.
References Moses::TrellisPath::GetEdges(), and OutputAlignment().

| void OutputAlignment | ( | OutputCollector * | collector, | |
| size_t | lineNo, | |||
| const Hypothesis * | hypo | |||
| ) |
Definition at line 246 of file IOWrapper.cpp.
References Moses::Hypothesis::GetPrevHypo(), and OutputAlignment().

| void OutputAlignment | ( | OutputCollector * | collector, | |
| size_t | lineNo, | |||
| const vector< const Hypothesis * > & | edges | |||
| ) |
Definition at line 238 of file IOWrapper.cpp.
References OutputAlignment(), and Moses::OutputCollector::Write().

| void OutputAlignment | ( | ostream & | out, | |
| const vector< const Hypothesis * > & | edges | |||
| ) |
Definition at line 222 of file IOWrapper.cpp.
References Moses::TargetPhrase::GetAlignmentInfo(), Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::Phrase::GetSize(), Moses::WordsRange::GetStartPos(), and OutputAlignment().

| void OutputAlignment | ( | ostream & | out, | |
| const AlignmentInfo & | ai, | |||
| size_t | sourceOffset, | |||
| size_t | targetOffset | |||
| ) |
Definition at line 209 of file IOWrapper.cpp.
References Moses::AlignmentInfo::GetSortedAlignments().
Referenced by OutputAlignment(), OutputNBest(), and TranslationTask::Run().


| void OutputBestHypo | ( | const std::vector< Word > & | mbrBestHypo, | |
| long | , | |||
| bool | , | |||
| bool | , | |||
| ostream & | out | |||
| ) |
Definition at line 309 of file IOWrapper.cpp.
| void OutputBestHypo | ( | const Moses::TrellisPath & | path, | |
| long | , | |||
| bool | reportSegmentation, | |||
| bool | reportAllFactors, | |||
| std::ostream & | out | |||
| ) |
Definition at line 283 of file IOWrapper.cpp.
References Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::TrellisPath::GetEdges(), Moses::WordsRange::GetEndPos(), Moses::Phrase::GetSize(), Moses::WordsRange::GetStartPos(), and OutputSurface().
Referenced by main(), and TranslationTask::Run().


| void OutputInput | ( | std::ostream & | os, | |
| const Hypothesis * | hypo | |||
| ) |
Definition at line 329 of file IOWrapper.cpp.
References Moses::Hypothesis::GetInput(), Moses::InputType::GetSize(), and OutputInput().

| void OutputInput | ( | std::vector< const Phrase * > & | map, | |
| const Hypothesis * | hypo | |||
| ) |
Definition at line 321 of file IOWrapper.cpp.
References Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetPrevHypo(), Moses::Hypothesis::GetSourcePhrase(), and Moses::WordsRange::GetStartPos().
Referenced by IOWrapper::OutputBestHypo(), OutputInput(), OutputNBest(), and TranslationTask::Run().


| void OutputLatticeMBRNBest | ( | std::ostream & | out, | |
| const vector< LatticeMBRSolution > & | solutions, | |||
| long | translationId | |||
| ) |
Definition at line 498 of file IOWrapper.cpp.
Referenced by TranslationTask::Run().

| void OutputNBest | ( | std::ostream & | out, | |
| const Moses::TrellisPathList & | nBestList, | |||
| const std::vector< Moses::FactorType > & | outputFactorOrder, | |||
| const TranslationSystem * | system, | |||
| long | translationId | |||
| ) |
Definition at line 364 of file IOWrapper.cpp.
References Moses::TrellisPathList::begin(), Moses::TrellisPathList::end(), Moses::TargetPhrase::GetAlignmentInfo(), Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::TrellisPath::GetEdges(), Moses::WordsRange::GetEndPos(), Moses::TranslationSystem::GetGenerationDictionaries(), Moses::TranslationSystem::GetPhraseDictionaries(), Moses::StaticData::GetReportAllFactorsNBest(), Moses::TrellisPath::GetScoreBreakdown(), Moses::ScoreComponentCollection::GetScoresForProducer(), Moses::WordsRange::GetStartPos(), Moses::TranslationSystem::GetStatefulFeatureFunctions(), Moses::TranslationSystem::GetStatelessFeatureFunctions(), Moses::TrellisPath::GetTargetWordsRange(), Moses::TrellisPath::GetTotalScore(), Moses::StaticData::IsLabeledNBestList(), Moses::StaticData::NBestIncludesAlignment(), OutputAlignment(), OutputInput(), OutputSurface(), and Moses::StaticData::PrintAlignmentInfoInNbest().
Referenced by TranslationTask::Run().


| void OutputSurface | ( | std::ostream & | out, | |
| const Hypothesis * | hypo, | |||
| const std::vector< FactorType > & | outputFactorOrder, | |||
| bool | reportSegmentation, | |||
| bool | reportAllFactors | |||
| ) |
Definition at line 267 of file IOWrapper.cpp.
References Moses::Hypothesis::GetCurrSourceWordsRange(), Moses::Hypothesis::GetCurrTargetPhrase(), Moses::WordsRange::GetEndPos(), Moses::Hypothesis::GetPrevHypo(), Moses::Phrase::GetSize(), Moses::WordsRange::GetStartPos(), NULL, and OutputSurface().

| void OutputSurface | ( | std::ostream & | out, | |
| const Phrase & | phrase, | |||
| const std::vector< FactorType > & | outputFactorOrder, | |||
| bool | reportAllFactors | |||
| ) |
Definition at line 189 of file IOWrapper.cpp.
References CHECK, Moses::Phrase::GetFactor(), and Moses::Phrase::GetSize().
Referenced by IOWrapper::OutputBestHypo(), OutputBestHypo(), OutputNBest(), OutputSurface(), and TranslationTask::Run().


| bool ReadInput | ( | IOWrapper & | ioWrapper, | |
| InputTypeEnum | inputType, | |||
| InputType *& | source | |||
| ) |
Definition at line 528 of file IOWrapper.cpp.
References Moses::ConfusionNetworkInput, IOWrapper::GetInput(), Moses::SentenceInput, TRACE_ERR, and Moses::WordLatticeInput.
Referenced by main().


1.5.9