00001 // $Id$ 00002 // vim:tabstop=2 00003 /*********************************************************************** 00004 Moses - factored phrase-based language decoder 00005 Copyright (C) 2010 Hieu Hoang 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2.1 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00020 ***********************************************************************/ 00021 00022 #pragma once 00023 00024 #include "ScoreComponentCollection.h" 00025 #include "Phrase.h" 00026 00027 #include <boost/shared_ptr.hpp> 00028 00029 namespace Moses 00030 { 00031 00032 class ChartHypothesis; 00033 class ChartTrellisDetour; 00034 class ChartTrellisDetourQueue; 00035 class ChartTrellisNode; 00036 00042 class ChartTrellisPath 00043 { 00044 public: 00045 ChartTrellisPath(const ChartHypothesis &hypo); 00046 ChartTrellisPath(const ChartTrellisDetour &detour); 00047 00048 ~ChartTrellisPath(); 00049 00050 const ChartTrellisNode &GetFinalNode() const { 00051 return *m_finalNode; 00052 } 00053 00054 const ChartTrellisNode *GetDeviationPoint() const { 00055 return m_deviationPoint; 00056 } 00057 00059 float GetTotalScore() const { 00060 return m_totalScore; 00061 } 00062 00063 Phrase GetOutputPhrase() const; 00064 00066 const ScoreComponentCollection &GetScoreBreakdown() const { 00067 return m_scoreBreakdown; 00068 } 00069 00070 private: 00071 ChartTrellisPath(const ChartTrellisPath &); // Not implemented 00072 ChartTrellisPath &operator=(const ChartTrellisPath &); // Not implemented 00073 00074 ChartTrellisNode *m_finalNode; 00075 ChartTrellisNode *m_deviationPoint; 00076 ScoreComponentCollection m_scoreBreakdown; 00077 float m_totalScore; 00078 }; 00079 00080 } // namespace Moses