10 #ifndef _STRUS_ANALYZER_POS_TAGGER_DATA_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_POS_TAGGER_DATA_INTERFACE_HPP_INCLUDED
21 class TokenMarkupContextInterface;
34 static const char* ar[] = {
"Marker",
"Content",
"BoundToPrevious",0};
38 const std::string&
tag()
const {
return m_tag;}
39 const std::string&
value()
const {
return m_value;}
40 const std::string&
ref()
const {
return m_ref;}
46 Element(
const Type& type_,
const std::string& tag_,
const std::string& value_,
const std::string& ref_)
47 :m_type(type_),m_tag(tag_),m_value(value_),m_ref(ref_){}
50 :m_type(o.m_type),m_tag(o.m_tag),m_value(o.m_value),m_ref(o.m_ref){}
68 virtual void insert(
int docno,
const std::vector<Element>& sequence)=0;
virtual void insert(int docno, const std::vector< Element > &sequence)=0
Add a tagged text chunk.
Definition: posTaggerDataInterface.hpp:31
virtual void declareIgnoredToken(const std::string &value)=0
Declare a token to be ignored in the document elements, if it does not match.
const std::string & tag() const
Tag string.
Definition: posTaggerDataInterface.hpp:38
Definition: posTaggerDataInterface.hpp:31
const std::string & ref() const
Referenced translation value of token (id attribute of tagged value)
Definition: posTaggerDataInterface.hpp:40
Interface for the data built by a POS tagger.
Definition: posTaggerDataInterface.hpp:24
virtual void markupSegment(TokenMarkupContextInterface *markupContext, int docno, int &docitr, const SegmenterPosition &segmentpos, const char *segmentptr, std::size_t segmentsize) const =0
Get a text chunk tagged.
int SegmenterPosition
Position of a segment in the original source.
Definition: segmenterContextInterface.hpp:20
const std::string & value() const
Value of token (tagged value)
Definition: posTaggerDataInterface.hpp:39
Definition: posTaggerDataInterface.hpp:31
Interface for the execution context of a document segmenter.
virtual ~PosTaggerDataInterface()
Definition: posTaggerDataInterface.hpp:59
Type
Definition: posTaggerDataInterface.hpp:31
Interface for annotation of text in one document.
Definition: tokenMarkupContextInterface.hpp:25
static const char * typeName(Type t)
Definition: posTaggerDataInterface.hpp:32
Output element declaration for POS tagging.
Definition: posTaggerDataInterface.hpp:28
const Type type() const
Type of mapping.
Definition: posTaggerDataInterface.hpp:37
Element(const Type &type_, const std::string &tag_, const std::string &value_, const std::string &ref_)
Constructor.
Definition: posTaggerDataInterface.hpp:46
Element(const Element &o)
Copy constructor.
Definition: posTaggerDataInterface.hpp:49