mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-02 17:09:36 +03:00
51 lines
843 B
C++
51 lines
843 B
C++
#pragma once
|
|
#include <boost/unordered_map.hpp>
|
|
#include "../HypothesisColl.h"
|
|
#include "../Recycler.h"
|
|
#include "Word.h"
|
|
|
|
namespace Moses2
|
|
{
|
|
class HypothesisBase;
|
|
class ArcLists;
|
|
|
|
namespace SCFG
|
|
{
|
|
class Hypothesis;
|
|
class Manager;
|
|
|
|
class Stack
|
|
{
|
|
public:
|
|
typedef boost::unordered_map<SCFG::Word, Moses2::HypothesisColl*> Coll;
|
|
|
|
Stack(const Manager &mgr);
|
|
virtual ~Stack();
|
|
|
|
const Coll &GetColl() const
|
|
{ return m_coll; }
|
|
|
|
const Moses2::HypothesisColl *GetColl(const SCFG::Word &nt) const;
|
|
|
|
size_t GetSize() const;
|
|
|
|
void Add(SCFG::Hypothesis *hypo, Recycler<HypothesisBase*> &hypoRecycle,
|
|
ArcLists &arcLists);
|
|
|
|
const Hypothesis *GetBestHypo() const;
|
|
|
|
std::string Debug(const System &system) const;
|
|
|
|
protected:
|
|
const Manager &m_mgr;
|
|
Coll m_coll;
|
|
|
|
Moses2::HypothesisColl &GetColl(const SCFG::Word &nt);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|