Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-12-07 19:07:11 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-07 19:07:11 +0300
commitc4e45fb128e096f255a624b57b7826febdf06f2e (patch)
tree74455d64b0e45877c91dc2488838cfe01732b224 /moses/Hypothesis.cpp
parent2be2481feb2d68d6e4ba366d06fcfa51f7ff664e (diff)
Code cleanup.
Diffstat (limited to 'moses/Hypothesis.cpp')
-rw-r--r--moses/Hypothesis.cpp97
1 files changed, 0 insertions, 97 deletions
diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp
index 6f0807347..a4faaf8d3 100644
--- a/moses/Hypothesis.cpp
+++ b/moses/Hypothesis.cpp
@@ -371,103 +371,6 @@ OutputInput(std::ostream& os) const
if (inp_phrases[i]) os << *inp_phrases[i];
}
-// void
-// Hypothesis::
-// OutputBestSurface(std::ostream &out, const std::vector<FactorType> &outputFactorOrder,
-// const ReportingOptions &options) const
-// {
-// if (m_prevHypo) {
-// // recursively retrace this best path through the lattice, starting from the end of the hypothesis sentence
-// m_prevHypo->OutputBestSurface(out, outputFactorOrder, options);
-// }
-// OutputSurface(out, *this, outputFactorOrder, options);
-// }
-
-// //////////////////////////////////////////////////////////////////////////
-// /***
-// * print surface factor only for the given phrase
-// */
-// void
-// Hypothesis::
-// OutputSurface(std::ostream &out, const Hypothesis &edge,
-// const std::vector<FactorType> &outputFactorOrder,
-// const ReportingOptions &options) const
-// {
-// UTIL_THROW_IF2(outputFactorOrder.size() == 0,
-// "Must specific at least 1 output factor");
-// const TargetPhrase& phrase = edge.GetCurrTargetPhrase();
-// // TODO: slay the rest of StaticData here and move stuff into ReportingOptions
-// bool markUnknown = GetManager().options().unk.mark;
-// bool featureLabels = StaticData::Instance().options().nbest.include_feature_labels;
-// if (options.ReportAllFactors == true) {
-// out << phrase;
-// } else {
-// FactorType placeholderFactor
-// = StaticData::Instance().options().input.placeholder_factor;
-
-// std::map<size_t, const Factor*> placeholders;
-// if (placeholderFactor != NOT_FOUND) {
-// // creates map of target position -> factor for placeholders
-// placeholders = GetPlaceholders(edge, placeholderFactor);
-// }
-
-// size_t size = phrase.GetSize();
-// for (size_t pos = 0 ; pos < size ; pos++) {
-// const Factor *factor = phrase.GetFactor(pos, outputFactorOrder[0]);
-
-// if (placeholders.size()) {
-// // do placeholders
-// std::map<size_t, const Factor*>::const_iterator iter = placeholders.find(pos);
-// if (iter != placeholders.end()) {
-// factor = iter->second;
-// }
-// }
-
-// UTIL_THROW_IF2(factor == NULL,
-// "No factor 0 at position " << pos);
-
-// //preface surface form with UNK if marking unknowns
-// const Word &word = phrase.GetWord(pos);
-// if(markUnknown && word.IsOOV()) {
-// out << GetManager().options().unk.prefix << *factor
-// << GetManager().options().unk.suffix;
-// } else {
-// out << *factor;
-// }
-
-// for (size_t i = 1 ; i < outputFactorOrder.size() ; i++) {
-// const Factor *factor = phrase.GetFactor(pos, outputFactorOrder[i]);
-// UTIL_THROW_IF2(factor == NULL,
-// "No factor " << i << " at position " << pos);
-
-// out << "|" << *factor;
-// }
-// out << " ";
-// }
-// }
-
-// // trace ("report segmentation") option "-t" / "-tt"
-// if (options.ReportSegmentation > 0 && phrase.GetSize() > 0) {
-// const Range &sourceRange = edge.GetCurrSourceWordsRange();
-// const int sourceStart = sourceRange.GetStartPos();
-// const int sourceEnd = sourceRange.GetEndPos();
-// out << "|" << sourceStart << "-" << sourceEnd; // enriched "-tt"
-// if (options.ReportSegmentation == 2) {
-// out << ",wa=";
-// edge.OutputAlignment(out, false);
-// // const AlignmentInfo &ai = edge.GetCurrTargetPhrase().GetAlignTerm();
-// // Hypothesis::OutputAlignment(out, ai, 0, 0, options.WA_SortOrder);
-// out << ",total=";
-// out << edge.GetScore() - edge.GetPrevHypo()->GetScore();
-// out << ",";
-// ScoreComponentCollection scoreBreakdown(edge.GetScoreBreakdown());
-// scoreBreakdown.MinusEquals(edge.GetPrevHypo()->GetScoreBreakdown());
-// scoreBreakdown.OutputAllFeatureScores(out, featureLabels);
-// }
-// out << "| ";
-// }
-// }
-
std::map<size_t, const Factor*>
Hypothesis::
GetPlaceholders(const Hypothesis &hypo, FactorType placeholderFactor) const