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 { return *m_basePath; } 00039 const ChartTrellisNode &GetSubstitutedNode() const { 00040 return m_substitutedNode; 00041 } 00042 const ChartHypothesis &GetReplacementHypo() const { 00043 return m_replacementHypo; 00044 } 00045 float GetTotalScore() const { return m_totalScore; } 00046 00047 private: 00048 boost::shared_ptr<const ChartTrellisPath> m_basePath; 00049 const ChartTrellisNode &m_substitutedNode; 00050 const ChartHypothesis &m_replacementHypo; 00051 float m_totalScore; 00052 }; 00053 00054 } // namespace Moses
1.5.9