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

28 lines
479 B
C
Raw Normal View History

#pragma once
#include "Phrase.h"
namespace Moses2
{
2016-03-31 23:00:16 +03:00
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
2016-03-31 23:00:16 +03:00
{
return m_size;
}
SubPhrase GetSubPhrase(size_t start, size_t size) const;
protected:
const Phrase *m_origPhrase;
size_t m_start, m_size;
};
}