Skip to content
Snippets Groups Projects
annotationmatch.h 1.1 KiB
Newer Older
#ifndef LIBWCCL_VALUES_ANNOTATIONMATCH_H
#define LIBWCCL_VALUES_ANNOTATIONMATCH_H

#include <libwccl/values/matchdata.h>
class AnnotationMatch : public MatchData
{
public:

	explicit AnnotationMatch(Position position, const std::string channel)
		: position_(position), channel_(channel)
	{
		BOOST_ASSERT(position_.get_value() != Position::Nowhere);
	}

	explicit AnnotationMatch(int pos,const std::string channel)
		: position_(pos), channel_(channel)
	{
		BOOST_ASSERT(position_.get_value() != Position::Nowhere);
	}

	/// MatchData override.
	/// MatchData override.
	Position first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>& s) const;
	/// MatchData override.
	Position last_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>& s) const;
	/// MatchData override
	std::string to_raw_string() const;

protected:
	/// MatchData override
	AnnotationMatch* clone_internal() const {
		return new AnnotationMatch(*this);
	}

private:
	Position position_;
	std::string channel_;
};

} /* end ns Wccl */

#endif // LIBWCCL_VALUES_ANNOTATIONMATCH_H