mosesdecoder/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h

58 lines
1.8 KiB
C
Raw Normal View History

2013-09-25 23:59:13 +04:00
/***********************************************************************
Moses - factored phrase-based language decoder
Copyright (C) 2011 University of Edinburgh
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
***********************************************************************/
#pragma once
#include <vector>
2013-09-27 12:43:43 +04:00
#include "moses/ChartRuleLookupManager.h"
#include "moses/StackVec.h"
2013-09-25 23:59:13 +04:00
namespace Moses
{
2013-09-28 12:42:17 +04:00
class TargetPhraseCollection;
2013-09-25 23:59:13 +04:00
class ChartParserCallback;
class DottedRuleColl;
class WordsRange;
class SkeletonPT;
2013-09-27 12:43:43 +04:00
class ChartRuleLookupManagerSkeleton : public ChartRuleLookupManager
2013-09-25 23:59:13 +04:00
{
public:
ChartRuleLookupManagerSkeleton(const ChartParser &parser,
2013-09-27 12:35:24 +04:00
const ChartCellCollectionBase &cellColl,
const SkeletonPT &skeletonPt);
2013-09-25 23:59:13 +04:00
~ChartRuleLookupManagerSkeleton();
virtual void GetChartRuleCollection(
const WordsRange &range,
size_t last,
2013-09-25 23:59:13 +04:00
ChartParserCallback &outColl);
private:
TargetPhrase *CreateTargetPhrase(const Word &sourceWord) const;
2013-09-27 12:43:43 +04:00
StackVec m_stackVec;
2013-09-28 12:42:17 +04:00
std::vector<TargetPhraseCollection*> m_tpColl;
const SkeletonPT &m_skeletonPT;
2013-09-25 23:59:13 +04:00
};
} // namespace Moses