mosesdecoder/contrib/other-builds/moses2/SCFG/InputPath.h

53 lines
1.1 KiB
C
Raw Normal View History

2016-03-01 22:57:40 +03:00
/*
* InputPath.h
*
* Created on: 23 Oct 2015
* Author: hieu
*/
#pragma once
#include <iostream>
#include <boost/unordered_map.hpp>
2016-03-01 22:57:40 +03:00
#include "../InputPathBase.h"
2016-04-16 16:35:42 +03:00
#include "TargetPhrases.h"
#include "ActiveChart.h"
2016-04-27 19:32:22 +03:00
#include "Word.h"
2016-03-01 22:57:40 +03:00
namespace Moses2
{
namespace SCFG
{
2016-04-15 15:57:46 +03:00
class TargetPhrases;
2016-04-16 16:35:42 +03:00
class TargetPhraseImpl;
2016-04-15 15:57:46 +03:00
2016-03-01 22:57:40 +03:00
2016-03-03 16:04:27 +03:00
////////////////////////////////////////////////////////////////////////////
2016-03-31 23:00:16 +03:00
class InputPath: public InputPathBase
2016-03-01 22:57:40 +03:00
{
2016-03-31 23:00:16 +03:00
friend std::ostream& operator<<(std::ostream &, const InputPath &);
2016-03-01 22:57:40 +03:00
public:
boost::unordered_map<SymbolBind, SCFG::TargetPhrases> targetPhrases;
2016-04-27 19:32:22 +03:00
SubPhrase<SCFG::Word> subPhrase;
2016-04-15 15:38:01 +03:00
2016-04-27 19:32:22 +03:00
InputPath(MemPool &pool, const SubPhrase<SCFG::Word> &subPhrase, const Range &range,
2016-03-31 23:00:16 +03:00
size_t numPt, const InputPath *prefixPath);
virtual ~InputPath();
2016-03-01 22:57:40 +03:00
2016-04-16 19:54:00 +03:00
const ActiveChart &GetActiveChart(size_t ptInd) const
{ return m_activeChart[ptInd]; }
void AddActiveChartEntry(size_t ptInd, ActiveChartEntry *chartEntry);
2016-03-01 22:57:40 +03:00
2016-04-20 18:54:08 +03:00
void AddTargetPhrase(const PhraseTable &pt,
const SCFG::SymbolBind &symbolBind,
const SCFG::TargetPhraseImpl *tp);
2016-04-16 16:35:42 +03:00
2016-03-01 22:57:40 +03:00
protected:
2016-03-31 23:00:16 +03:00
ActiveChart *m_activeChart;
2016-03-01 22:57:40 +03:00
};
}
}