#ifndef ANONYMIZED_SENTENCE_HDR #define ANONYMIZED_SENTENCE_HDR #include "concordia/common/config.hpp" #include "concordia/token_annotation.hpp" #include #include #include /*! A sentence after anonymization operations. The class holds the current string represenation of the sentence along with the annotations list. */ class AnonymizedSentence { public: /*! Constructor. */ AnonymizedSentence(std::string sentence); /*! Destructor. */ virtual ~AnonymizedSentence(); /*! Getter for sentence \returns sentence */ std::string getSentence() const { return _sentence; } /*! Getter for annotations list \returns annotations list */ std::list getAnnotations() const { return _tokenAnnotations; } /*! Transform the sentence to lower case. */ void toLowerCase(); /*! Add new annotations to the existing annotations list. Assumptions: 1. existing _tokenAnnotations vector contains disjoint, sorted intervals; 2. the annotations to be added list also has the above properties. The below algorithm will only add the annotations that do not intersect with any of the existing ones. \param annotations list of annotations to be added */ void addAnnotations(std::vector annotations); private: std::string _sentence; std::list _tokenAnnotations; }; #endif