LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::Common::BagOfWords::AbstractBoWElement Class Referenceabstract

This class is the abstract base class of all elements that can be stored in a BoWText. More...

#include <linguisticProcessing/common/BagOfWords/AbstractBoWElement.h>

Inheritance diagram for Lima::Common::BagOfWords::AbstractBoWElement:
Lima::Common::BagOfWords::BoWPredicate Lima::Common::BagOfWords::BoWToken Lima::Common::BagOfWords::BoWComplexToken Lima::Common::BagOfWords::BoWNamedEntity Lima::Common::BagOfWords::BoWTerm

Public Member Functions

 AbstractBoWElement ()
 
virtual ~AbstractBoWElement ()
 
virtual void clear ()
 
virtual AbstractBoWElement * clone () const =0
 
virtual uint64_t size (void) const =0
 size of the AbstractBoWElement is the number of parts in the token: 0 for a predicate, 1 for a simple token, n for complex tokens
 
virtual BoWType getType () const
 
virtual Lima::LimaString getString (void) const =0
 
virtual uint64_t getPosition (void) const =0
 
virtual uint64_t getLength (void) const =0
 
virtual void setPosition (const uint64_t pos)=0
 
virtual void setLength (const uint64_t len)=0
 
virtual std::set< uint64_t > getVertices () const =0
 returns the set of vertices covered by this element
 
virtual std::string getOutputUTF8String (const Common::PropertyCode::PropertyManager *macroManager=0) const =0
 get a string of the AbstractBoWElement for output function
 
virtual std::string getIdUTF8String () const =0
 function used to identify a bowtoken in a text (used in BowDumper)
 

Detailed Description

This class is the abstract base class of all elements that can be stored in a BoWText.

This includes tokens like simple ones and complex ones as specific entities but also non-token elements like predicates and their arguments

Definition at line 71 of file AbstractBoWElement.h.

Constructor & Destructor Documentation

◆ AbstractBoWElement()

Lima::Common::BagOfWords::AbstractBoWElement::AbstractBoWElement ( )
inline

Definition at line 75 of file AbstractBoWElement.h.

◆ ~AbstractBoWElement()

virtual Lima::Common::BagOfWords::AbstractBoWElement::~AbstractBoWElement ( )
inlinevirtual

Definition at line 77 of file AbstractBoWElement.h.

Member Function Documentation

◆ clear()

virtual void Lima::Common::BagOfWords::AbstractBoWElement::clear ( )
inlinevirtual

◆ clone()

virtual AbstractBoWElement * Lima::Common::BagOfWords::AbstractBoWElement::clone ( ) const
pure virtual

◆ getIdUTF8String()

virtual std::string Lima::Common::BagOfWords::AbstractBoWElement::getIdUTF8String ( ) const
pure virtual

◆ getLength()

virtual uint64_t Lima::Common::BagOfWords::AbstractBoWElement::getLength ( void  ) const
pure virtual

◆ getOutputUTF8String()

virtual std::string Lima::Common::BagOfWords::AbstractBoWElement::getOutputUTF8String ( const Common::PropertyCode::PropertyManager *  macroManager = 0) const
pure virtual

get a string of the AbstractBoWElement for output function

Parameters
macroAccessorif not null, will output the human readable form of the macrocategory. otherwise output the integer code

Implemented in Lima::Common::BagOfWords::BoWNamedEntity, Lima::Common::BagOfWords::BoWPredicate, Lima::Common::BagOfWords::BoWTerm, and Lima::Common::BagOfWords::BoWToken.

◆ getPosition()

virtual uint64_t Lima::Common::BagOfWords::AbstractBoWElement::getPosition ( void  ) const
pure virtual

◆ getString()

virtual Lima::LimaString Lima::Common::BagOfWords::AbstractBoWElement::getString ( void  ) const
pure virtual

◆ getType()

virtual BoWType Lima::Common::BagOfWords::AbstractBoWElement::getType ( ) const
inlinevirtual

◆ getVertices()

virtual std::set< uint64_t > Lima::Common::BagOfWords::AbstractBoWElement::getVertices ( ) const
pure virtual

returns the set of vertices covered by this element

Returns
the set of vertices covered by this element

Implemented in Lima::Common::BagOfWords::BoWComplexToken, Lima::Common::BagOfWords::BoWNamedEntity, Lima::Common::BagOfWords::BoWPredicate, and Lima::Common::BagOfWords::BoWToken.

◆ setLength()

virtual void Lima::Common::BagOfWords::AbstractBoWElement::setLength ( const uint64_t  len)
pure virtual

◆ setPosition()

virtual void Lima::Common::BagOfWords::AbstractBoWElement::setPosition ( const uint64_t  pos)
pure virtual

◆ size()

virtual uint64_t Lima::Common::BagOfWords::AbstractBoWElement::size ( void  ) const
pure virtual

size of the AbstractBoWElement is the number of parts in the token: 0 for a predicate, 1 for a simple token, n for complex tokens

Implemented in Lima::Common::BagOfWords::BoWComplexToken, Lima::Common::BagOfWords::BoWPredicate, and Lima::Common::BagOfWords::BoWToken.


The documentation for this class was generated from the following file: