00001 /*********************************************************************** 00002 Moses - statistical machine translation system 00003 Copyright (C) 2006-2011 University of Edinburgh 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 ***********************************************************************/ 00019 00020 #pragma once 00021 00022 #include <boost/shared_ptr.hpp> 00023 00024 namespace Moses 00025 { 00026 class ChartHypothesis; 00027 class ChartTrellisNode; 00028 class ChartTrellisPath; 00029 00032 class ChartTrellisDetour 00033 { 00034 public: 00035 ChartTrellisDetour(boost::shared_ptr<const ChartTrellisPath>, 00036 const ChartTrellisNode &, const ChartHypothesis &); 00037 00038 const ChartTrellisPath &GetBasePath() const { 00039 return *m_basePath; 00040 } 00041 const ChartTrellisNode &GetSubstitutedNode() const { 00042 return m_substitutedNode; 00043 } 00044 const ChartHypothesis &GetReplacementHypo() const { 00045 return m_replacementHypo; 00046 } 00047 float GetTotalScore() const { 00048 return m_totalScore; 00049 } 00050 00051 private: 00052 boost::shared_ptr<const ChartTrellisPath> m_basePath; 00053 const ChartTrellisNode &m_substitutedNode; 00054 const ChartHypothesis &m_replacementHypo; 00055 float m_totalScore; 00056 }; 00057 00058 } // namespace Moses