mosesdecoder/contrib/other-builds/moses2/SubPhrase.h

26 lines
474 B
C
Raw Normal View History

#pragma once
#include "Phrase.h"
namespace Moses2
{
class SubPhrase : public Phrase
{
friend std::ostream& operator<<(std::ostream &, const SubPhrase &);
public:
SubPhrase(const Phrase &origPhrase, size_t start, size_t size);
2016-02-19 23:58:31 +03:00
virtual const Word& operator[](size_t pos) const;
virtual size_t GetSize() const
{ return m_size; }
SubPhrase GetSubPhrase(size_t start, size_t size) const;
protected:
const Phrase *m_origPhrase;
size_t m_start, m_size;
};
}