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

This is a complex token used to represent a named entity token. More...

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

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

Public Member Functions

 BoWNamedEntity ()
 
 BoWNamedEntity (const BoWNamedEntity &)
 
 BoWNamedEntity (const Lima::LimaString &lemma, const Common::MediaticData::EntityType theType, const uint64_t position, const uint64_t length)
 
 BoWNamedEntity (const Lima::LimaString &lemma, const LinguisticCode theCategory, const Common::MediaticData::EntityType theType, const uint64_t position, const uint64_t length)
 
virtual ~BoWNamedEntity ()
 
virtual BoWNamedEntity * clone () const override
 
BoWNamedEntity & operator= (const BoWNamedEntity &)
 
bool operator== (const BoWNamedEntity &)
 
Common::MediaticData::EntityType getNamedEntityType (void) const
 
void setNamedEntityType (const Common::MediaticData::EntityType &)
 
const std::map< std::string, LimaString > & getFeatures () const
 
void setFeature (const std::string &attribute, const LimaString &value)
 
virtual BoWType getType () const override
 
std::string getFeaturesUTF8String (void) const
 get a string of the features, of the kind : attribute1=value1;attribute2=value2
 
virtual std::string getOutputUTF8String (const Common::PropertyCode::PropertyManager *macroManager=0) const override
 get a string of the BoWToken for output function
 
virtual std::string getIdUTF8String (void) const override
 function used to identify a bowtoken in a text (used in BowDumper)
 
virtual std::set< uint64_t > getVertices () const override
 returns a singleton made of the value of the getVertex function.
 
- Public Member Functions inherited from Lima::Common::BagOfWords::BoWComplexToken
 BoWComplexToken ()
 
 BoWComplexToken (const Lima::LimaString &lemma, const LinguisticCode category, const uint64_t position, const uint64_t length)
 
 BoWComplexToken (const Lima::LimaString &lemma, const LinguisticCode category, const uint64_t position, const uint64_t length, std::deque< boost::shared_ptr< Lima::Common::BagOfWords::BoWToken > > &parts, const uint64_t head)
 a constructor to build a simple, independent complex token (parts are simple tokens, not listed elsewhere in a BoWText)
 
virtual ~BoWComplexToken ()
 
virtual void clear () override
 
virtual Lima::LimaString getLemma (void) const override
 
virtual Lima::LimaString getInflectedForm (void) const override
 
BoWComplexToken & operator= (const BoWComplexToken &)
 
bool operator== (const BoWComplexToken &)
 
uint64_t size (void) const override
 size is the number of parts in the token
 
std::deque< Part > & getParts (void)
 
const std::deque< Part > & getParts (void) const
 
std::deque< Part >::iterator getPartsIterator (void)
 
const std::deque< Part >::const_iterator getPartsIterator (void) const
 
boost::shared_ptr< BoWToken > addPart (boost::shared_ptr< BoWToken > tok, const bool isHead=false)
 add a part in the list of parts of the complex token.
 
boost::shared_ptr< BoWToken > addPart (boost::shared_ptr< BoWRelation > rel, boost::shared_ptr< BoWToken > tok, const bool isHead=false)
 add a part in the list of parts of the complex token.
 
uint64_t getHead () const
 add a part in the list of parts of the complex token.
 
void setHead (const uint64_t)
 
std::string getUTF8StringParts (const Common::PropertyCode::PropertyManager *macroManager=0) const
 
std::string getstdstringParts () const
 
virtual Common::Misc::PositionLengthList getPositionLengthList () const override
 get the list of (position,length) couples of the elements of the token (if several)
 
void addToPosition (const uint64_t offset) override
 add the offset to the positions of the token and of each of its parts (recusrively)
 
- Public Member Functions inherited from Lima::Common::BagOfWords::BoWToken
 BoWToken (const Lima::LimaString &lemma, const LinguisticCode category, const uint64_t position, const uint64_t length)
 
 BoWToken (const Lima::LimaString &str, const uint64_t position=0, const uint64_t length=0)
 
 BoWToken (const BoWToken &tok)
 
 BoWToken ()
 
virtual ~BoWToken ()
 
LinguisticCode getCategory (void) const
 
uint64_t getPosition (void) const override
 
uint64_t getLength (void) const override
 
void setLemma (const Lima::LimaString &lemma)
 
void setInflectedForm (const Lima::LimaString &inflectedForm)
 
void setCategory (LinguisticCode c)
 
void setPosition (const uint64_t pos) override
 
void setLength (const uint64_t len) override
 
virtual Lima::LimaString getString (void) const override
 
uint64_t getVertex () const
 
void setVertex (uint64_t vertex)
 
bool operator== (const BoWToken &) const
 redefine equality
 
bool operator!= (const BoWToken &) const
 redefine inequality as negation of equality.
 
- Public Member Functions inherited from Lima::Common::BagOfWords::AbstractBoWElement
 AbstractBoWElement ()
 
virtual ~AbstractBoWElement ()
 

Protected Member Functions

 BoWNamedEntity (BoWNamedEntityPrivate &)
 
- Protected Member Functions inherited from Lima::Common::BagOfWords::BoWComplexToken
 BoWComplexToken (BoWComplexTokenPrivate &d)
 
- Protected Member Functions inherited from Lima::Common::BagOfWords::BoWToken
 BoWToken (BoWTokenPrivate &d)
 
BoWToken & operator= (const BoWToken &tok)
 
bool operator== (const BoWToken &tok)
 

Friends

class BoWNamedEntityPrivate
 

Additional Inherited Members

- Static Public Member Functions inherited from Lima::Common::BagOfWords::BoWToken
static void setInternalSeparator (const LimaChar c)
 
static void setCompoundSeparator (const LimaChar c)
 
static LimaChar getInternalSeparator ()
 
static LimaChar getCompoundSeparator ()
 
static void setUseOnlyLemma (const bool b)
 
static bool getUseOnlyLemma ()
 
- Protected Attributes inherited from Lima::Common::BagOfWords::BoWToken
BoWTokenPrivate * m_d
 

Detailed Description

This is a complex token used to represent a named entity token.

Author
Gael de Chalendar

Definition at line 33 of file bowNamedEntity.h.

Constructor & Destructor Documentation

◆ BoWNamedEntity() [1/5]

Lima::Common::BagOfWords::BoWNamedEntity::BoWNamedEntity ( )

Definition at line 117 of file bowNamedEntity.cpp.

◆ BoWNamedEntity() [2/5]

Lima::Common::BagOfWords::BoWNamedEntity::BoWNamedEntity ( const BoWNamedEntity &  ne)

Definition at line 150 of file bowNamedEntity.cpp.

◆ BoWNamedEntity() [3/5]

Lima::Common::BagOfWords::BoWNamedEntity::BoWNamedEntity ( const Lima::LimaString &  lemma,
const Common::MediaticData::EntityType  theType,
const uint64_t  position,
const uint64_t  length 
)

Definition at line 122 of file bowNamedEntity.cpp.

◆ BoWNamedEntity() [4/5]

Lima::Common::BagOfWords::BoWNamedEntity::BoWNamedEntity ( const Lima::LimaString &  lemma,
const LinguisticCode  theCategory,
const Common::MediaticData::EntityType  theType,
const uint64_t  position,
const uint64_t  length 
)

Definition at line 135 of file bowNamedEntity.cpp.

◆ ~BoWNamedEntity()

Lima::Common::BagOfWords::BoWNamedEntity::~BoWNamedEntity ( )
virtual

Definition at line 162 of file bowNamedEntity.cpp.

◆ BoWNamedEntity() [5/5]

Lima::Common::BagOfWords::BoWNamedEntity::BoWNamedEntity ( BoWNamedEntityPrivate &  d)
protected

Definition at line 156 of file bowNamedEntity.cpp.

Member Function Documentation

◆ clone()

BoWNamedEntity * Lima::Common::BagOfWords::BoWNamedEntity::clone ( ) const
overridevirtual

Reimplemented from Lima::Common::BagOfWords::BoWToken.

Definition at line 205 of file bowNamedEntity.cpp.

◆ getFeatures()

const std::map< std::string, LimaString > & Lima::Common::BagOfWords::BoWNamedEntity::getFeatures ( ) const

Definition at line 196 of file bowNamedEntity.cpp.

◆ getFeaturesUTF8String()

std::string Lima::Common::BagOfWords::BoWNamedEntity::getFeaturesUTF8String ( void  ) const

get a string of the features, of the kind : attribute1=value1;attribute2=value2

Definition at line 219 of file bowNamedEntity.cpp.

◆ getIdUTF8String()

std::string Lima::Common::BagOfWords::BoWNamedEntity::getIdUTF8String ( void  ) const
overridevirtual

function used to identify a bowtoken in a text (used in BowDumper)

Reimplemented from Lima::Common::BagOfWords::BoWToken.

Definition at line 243 of file bowNamedEntity.cpp.

◆ getNamedEntityType()

Common::MediaticData::EntityType Lima::Common::BagOfWords::BoWNamedEntity::getNamedEntityType ( void  ) const

Definition at line 185 of file bowNamedEntity.cpp.

◆ getOutputUTF8String()

std::string Lima::Common::BagOfWords::BoWNamedEntity::getOutputUTF8String ( const Common::PropertyCode::PropertyManager *  macroManager = 0) const
overridevirtual

get a string of the BoWToken for output function

Reimplemented from Lima::Common::BagOfWords::BoWToken.

Definition at line 236 of file bowNamedEntity.cpp.

◆ getType()

virtual BoWType Lima::Common::BagOfWords::BoWNamedEntity::getType ( ) const
inlineoverridevirtual

Implements Lima::Common::BagOfWords::BoWComplexToken.

Definition at line 66 of file bowNamedEntity.h.

◆ getVertices()

virtual std::set< uint64_t > Lima::Common::BagOfWords::BoWNamedEntity::getVertices ( ) const
inlineoverridevirtual

returns a singleton made of the value of the getVertex function.

vertices of the named entity parts are not known as they can be generated either from before PoS graph or from PoS graph. In the former case, there is no vertices in the PoS graph that can be associated to the NE parts vertices

Returns
a singleton made of the value of the getVertex function

Reimplemented from Lima::Common::BagOfWords::BoWComplexToken.

Definition at line 87 of file bowNamedEntity.h.

◆ operator=()

BoWNamedEntity & Lima::Common::BagOfWords::BoWNamedEntity::operator= ( const BoWNamedEntity &  t)

Definition at line 167 of file bowNamedEntity.cpp.

◆ operator==()

bool Lima::Common::BagOfWords::BoWNamedEntity::operator== ( const BoWNamedEntity &  t)

Definition at line 177 of file bowNamedEntity.cpp.

◆ setFeature()

void Lima::Common::BagOfWords::BoWNamedEntity::setFeature ( const std::string &  attribute,
const LimaString &  value 
)

Definition at line 200 of file bowNamedEntity.cpp.

◆ setNamedEntityType()

void Lima::Common::BagOfWords::BoWNamedEntity::setNamedEntityType ( const Common::MediaticData::EntityType &  t)

Definition at line 190 of file bowNamedEntity.cpp.

Friends And Related Symbol Documentation

◆ BoWNamedEntityPrivate

friend class BoWNamedEntityPrivate
friend

Definition at line 35 of file bowNamedEntity.h.


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