00001 /*********************************************************************** 00002 Moses - factored phrase-based language decoder 00003 Copyright (C) 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 <vector> 00023 #include "moses/ChartRuleLookupManager.h" 00024 #include "moses/StackVec.h" 00025 00026 namespace Moses 00027 { 00028 class TargetPhraseCollection; 00029 class ChartParserCallback; 00030 class DottedRuleColl; 00031 class Range; 00032 class ExamplePT; 00033 00034 class ChartRuleLookupManagerExample : public ChartRuleLookupManager 00035 { 00036 public: 00037 ChartRuleLookupManagerExample(const ChartParser &parser, 00038 const ChartCellCollectionBase &cellColl, 00039 const ExamplePT &skeletonPt); 00040 00041 ~ChartRuleLookupManagerExample(); 00042 00043 virtual void GetChartRuleCollection( 00044 const InputPath &inputPath, 00045 size_t last, 00046 ChartParserCallback &outColl); 00047 00048 private: 00049 TargetPhrase *CreateTargetPhrase(const Word &sourceWord) const; 00050 00051 StackVec m_stackVec; 00052 std::vector<TargetPhraseCollection::shared_ptr > m_tpColl; 00053 const ExamplePT &m_skeletonPT; 00054 }; 00055 00056 } // namespace Moses 00057