10 #ifndef _STRUS_ANALYZER_SEGMENTER_MARKUP_CONTEXT_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_SEGMENTER_MARKUP_CONTEXT_INTERFACE_HPP_INCLUDED
57 const std::string& name)=0;
67 const std::string& name,
68 const std::string& value)=0;
77 const std::string& name)=0;
int SegmenterPosition
Position of a segment in the original source.
Definition: segmenterContextInterface.hpp:20
virtual void putOpenTag(const SegmenterPosition &segpos, std::size_t ofs, const std::string &name)=0
Define an open tag markup in the text.
virtual unsigned int segmentSize(const SegmenterPosition &segpos)=0
Get the size in bytes of a segment converted to UTF-8.
virtual void putCloseTag(const SegmenterPosition &segpos, std::size_t ofs, const std::string &name)=0
Define a close tag markup in the text.
virtual std::string getContent() const =0
Get the original document content with all markups declared inserted.
virtual void putAttribute(const SegmenterPosition &segpos, std::size_t ofs, const std::string &name, const std::string &value)=0
Define an attribute markup in the text.
virtual ~SegmenterMarkupContextInterface()
Destructor.
Definition: segmenterMarkupContextInterface.hpp:25
Interface for the execution context of a document segmenter.
Defines the context for inserting markups into one document.
Definition: segmenterMarkupContextInterface.hpp:21
virtual int tagLevel(const SegmenterPosition &segpos) const =0
Get the (tag) hierarchy level of a segment specified by its position in the original source...
virtual bool getNext(SegmenterPosition &segpos, const char *&segment, std::size_t &segmentsize)=0
Get the next content segment.
virtual std::string tagName(const SegmenterPosition &segpos) const =0
Get the (tag) name of a segment specified by its position in the original source. ...