diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2014-12-02 22:09:10 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2014-12-02 22:09:10 +0300 |
commit | 3da84150959de4dc99edf3ee35665e81a23aae26 (patch) | |
tree | ee7c487a26f2d56f56763dd5fe8885f6d6130465 /moses/ChartManager.h | |
parent | ba7afba9f6f325441387557ab8af487d5901f023 (diff) |
add OutputNBest() as abstract method to BaseManager. Tighten up framework
Diffstat (limited to 'moses/ChartManager.h')
-rw-r--r-- | moses/ChartManager.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/moses/ChartManager.h b/moses/ChartManager.h index 849101b5d..80f6586bb 100644 --- a/moses/ChartManager.h +++ b/moses/ChartManager.h @@ -41,7 +41,6 @@ namespace Moses class ChartHypothesis; class ChartSearchGraphWriter; -class OutputCollector; /** Holds everything you need to decode 1 sentence with the hierachical/syntax decoder */ @@ -68,15 +67,14 @@ private: void OutputNBestList(OutputCollector *collector, const ChartKBestExtractor::KBestVec &nBestList, - long translationId); - void OutputSurface(std::ostream &out, const Phrase &phrase, const std::vector<FactorType> &outputFactorOrder, bool reportAllFactors); - size_t CalcSourceSize(const Moses::ChartHypothesis *hypo); + long translationId) const; + size_t CalcSourceSize(const Moses::ChartHypothesis *hypo) const; size_t OutputAlignmentNBest(Alignments &retAlign, const Moses::ChartKBestExtractor::Derivation &derivation, - size_t startTarget); + size_t startTarget) const; template <class T> - void ShiftOffsets(std::vector<T> &offsets, T shift) + void ShiftOffsets(std::vector<T> &offsets, T shift) const { T currPos = shift; for (size_t i = 0; i < offsets.size(); ++i) { @@ -138,7 +136,7 @@ public: const ChartParser &GetParser() const { return m_parser; } // outputs - void OutputNBest(OutputCollector *collector); + void OutputNBest(OutputCollector *collector) const; }; } |