33namespace PropertyCode {
34 class PropertyManager;
52 const uint64_t position,
53 const uint64_t length);
55 const uint64_t position=0,
56 const uint64_t length=0);
62 virtual void clear()
override {}
64 virtual BoWToken* clone()
const override;
70 uint64_t getPosition(
void)
const override;
71 uint64_t getLength(
void)
const override;
74 virtual uint64_t size(
void)
const override;
79 void setPosition(
const uint64_t pos)
override;
80 void setLength(
const uint64_t len)
override;
84 static void setInternalSeparator(
const LimaChar c);
85 static void setCompoundSeparator(
const LimaChar c);
87 static LimaChar getInternalSeparator();
88 static LimaChar getCompoundSeparator();
90 virtual BoWType getType()
const override;
92 uint64_t getVertex()
const;
93 void setVertex(uint64_t vertex);
103 virtual std::set< uint64_t > getVertices()
const override;
112 virtual std::string getIdUTF8String()
const override;
126 bool operator==(
const BoWToken&)
const;
132 bool operator!=(
const BoWToken&)
const;
146 virtual void addToPosition(
const uint64_t offset);
153 static void setUseOnlyLemma(
const bool b);
154 static bool getUseOnlyLemma();
158 const std::map<BoWToken*,uint64_t>& refMap);
160 const std::map<BoWToken*,uint64_t>& refMap);
165 bool operator==(
const BoWToken& tok);
QDebug & operator<<(QDebug &qd, const std::string &str)
This class is the abstract base class of all elements that can be stored in a BoWText.
This class contains the representation of an element of the bag of words.
BoWToken(const Lima::LimaString &lemma, const LinguisticCode category, const uint64_t position, const uint64_t length)
virtual void clear() override
BoWToken(const Lima::LimaString &str, const uint64_t position=0, const uint64_t length=0)
Provide tools to manage a specific property.
BoWType
enum to characterize the type of the AbstractBoWElement
std::vector< std::pair< Position, Length > > PositionLengthList