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

Represent an element of an index If it is a predicate, its simple term is "PredicateElement" and its neType is the type of the predicate. More...

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

Public Member Functions

 IndexElement ()
 
 IndexElement (const uint64_t id, const BagOfWords::BoWType type, const LimaString &word, const LinguisticCode cat=LinguisticCode::ZERO, const uint64_t position=0, const uint64_t length=0, const MediaticData::EntityType neType=MediaticData::EntityType())
 
 IndexElement (const uint64_t id, const Lima::Common::BagOfWords::BoWType type, const std::vector< uint64_t > &structure, const std::vector< uint64_t > &relations, const MediaticData::EntityType neType=MediaticData::EntityType())
 
 IndexElement (const IndexElement &ie)
 
IndexElement & operator= (const IndexElement &)
 
 ~IndexElement ()
 
bool operator== (const IndexElement &other) const
 equality operator just compare content, not positions
 
bool hasSamePosition (const IndexElement &other) const
 compare position and length
 
bool hasNearlySamePosition (const IndexElement &other) const
 compare position and length: thereis some intersaction in position
 
bool empty () const
 
uint64_t getId () const
 
Lima::Common::BagOfWords::BoWType getType () const
 
bool isSimpleTerm () const
 
bool isComposedTerm () const
 
bool isPredicate () const
 
const LimaString & getSimpleTerm () const
 
LinguisticCode getCategory () const
 
uint64_t getPosition () const
 
uint64_t getLength () const
 
bool isNamedEntity () const
 
const Common::MediaticData::EntityType & getNamedEntityType () const
 
Lima::Common::Misc::PositionLengthList & getPositionLengthList ()
 
const Misc::PositionLengthList & getPositionLengthList () const
 
const std::vector< uint64_t > & getStructure () const
 
std::vector< uint64_t > & getStructure ()
 
const std::vector< uint64_t > & getRelations () const
 
std::vector< uint64_t > & getRelations ()
 
void setId (const uint64_t id)
 
void setSimpleTerm (const LimaString &t)
 
void setCategory (LinguisticCode category)
 
void setStructure (const std::vector< uint64_t > &s, const std::vector< uint64_t > &r)
 
void addInStructure (uint64_t id, uint64_t rel)
 

Friends

LIMA_BOW_EXPORT std::ostream & operator<< (std::ostream &os, const IndexElement &elt)
 
LIMA_BOW_EXPORT QDebug & operator<< (QDebug &os, const IndexElement &elt)
 
LIMA_BOW_EXPORT QTextStream & operator<< (QTextStream &os, const IndexElement &elt)
 

Detailed Description

Represent an element of an index If it is a predicate, its simple term is "PredicateElement" and its neType is the type of the predicate.

Its structure and relations allow to find its roles If it is a role, its simple term is "PredicateRole" and its neType is the type of the type of the. Its structure and relations are empty except if it is itself a predicate (in case of reified predicates).

Definition at line 45 of file indexElement.h.

Constructor & Destructor Documentation

◆ IndexElement() [1/4]

Lima::Common::BagOfWords::IndexElement::IndexElement ( )

Definition at line 155 of file indexElement.cpp.

◆ IndexElement() [2/4]

Lima::Common::BagOfWords::IndexElement::IndexElement ( const uint64_t  id,
const BagOfWords::BoWType  type,
const LimaString &  word,
const LinguisticCode  cat = LinguisticCode::ZERO,
const uint64_t  position = 0,
const uint64_t  length = 0,
const MediaticData::EntityType  neType = MediaticData::EntityType() 
)

Definition at line 159 of file indexElement.cpp.

◆ IndexElement() [3/4]

Lima::Common::BagOfWords::IndexElement::IndexElement ( const uint64_t  id,
const Lima::Common::BagOfWords::BoWType  type,
const std::vector< uint64_t > &  structure,
const std::vector< uint64_t > &  relations,
const MediaticData::EntityType  neType = MediaticData::EntityType() 
)

Definition at line 171 of file indexElement.cpp.

◆ IndexElement() [4/4]

Lima::Common::BagOfWords::IndexElement::IndexElement ( const IndexElement &  ie)

Definition at line 181 of file indexElement.cpp.

◆ ~IndexElement()

Lima::Common::BagOfWords::IndexElement::~IndexElement ( )

Definition at line 194 of file indexElement.cpp.

Member Function Documentation

◆ addInStructure()

void Lima::Common::BagOfWords::IndexElement::addInStructure ( uint64_t  id,
uint64_t  rel 
)

Definition at line 262 of file indexElement.cpp.

◆ empty()

bool Lima::Common::BagOfWords::IndexElement::empty ( ) const

Definition at line 216 of file indexElement.cpp.

◆ getCategory()

LinguisticCode Lima::Common::BagOfWords::IndexElement::getCategory ( ) const

Definition at line 230 of file indexElement.cpp.

◆ getId()

uint64_t Lima::Common::BagOfWords::IndexElement::getId ( ) const

Definition at line 218 of file indexElement.cpp.

◆ getLength()

uint64_t Lima::Common::BagOfWords::IndexElement::getLength ( ) const

Definition at line 234 of file indexElement.cpp.

◆ getNamedEntityType()

const MediaticData::EntityType & Lima::Common::BagOfWords::IndexElement::getNamedEntityType ( ) const

Definition at line 238 of file indexElement.cpp.

◆ getPosition()

uint64_t Lima::Common::BagOfWords::IndexElement::getPosition ( ) const

Definition at line 232 of file indexElement.cpp.

◆ getPositionLengthList() [1/2]

PositionLengthList & Lima::Common::BagOfWords::IndexElement::getPositionLengthList ( )

Definition at line 240 of file indexElement.cpp.

◆ getPositionLengthList() [2/2]

const PositionLengthList & Lima::Common::BagOfWords::IndexElement::getPositionLengthList ( ) const

Definition at line 242 of file indexElement.cpp.

◆ getRelations() [1/2]

std::vector< uint64_t > & Lima::Common::BagOfWords::IndexElement::getRelations ( )

Definition at line 250 of file indexElement.cpp.

◆ getRelations() [2/2]

const std::vector< uint64_t > & Lima::Common::BagOfWords::IndexElement::getRelations ( ) const

Definition at line 248 of file indexElement.cpp.

◆ getSimpleTerm()

const LimaString & Lima::Common::BagOfWords::IndexElement::getSimpleTerm ( ) const

Definition at line 228 of file indexElement.cpp.

◆ getStructure() [1/2]

std::vector< uint64_t > & Lima::Common::BagOfWords::IndexElement::getStructure ( )

Definition at line 246 of file indexElement.cpp.

◆ getStructure() [2/2]

const std::vector< uint64_t > & Lima::Common::BagOfWords::IndexElement::getStructure ( ) const

Definition at line 244 of file indexElement.cpp.

◆ getType()

BagOfWords::BoWType Lima::Common::BagOfWords::IndexElement::getType ( ) const

Definition at line 220 of file indexElement.cpp.

◆ hasNearlySamePosition()

bool Lima::Common::BagOfWords::IndexElement::hasNearlySamePosition ( const IndexElement &  other) const

compare position and length: thereis some intersaction in position

Definition at line 280 of file indexElement.cpp.

◆ hasSamePosition()

bool Lima::Common::BagOfWords::IndexElement::hasSamePosition ( const IndexElement &  other) const

compare position and length

Definition at line 265 of file indexElement.cpp.

◆ isComposedTerm()

bool Lima::Common::BagOfWords::IndexElement::isComposedTerm ( ) const

Definition at line 224 of file indexElement.cpp.

◆ isNamedEntity()

bool Lima::Common::BagOfWords::IndexElement::isNamedEntity ( ) const

Definition at line 236 of file indexElement.cpp.

◆ isPredicate()

bool Lima::Common::BagOfWords::IndexElement::isPredicate ( ) const

Definition at line 226 of file indexElement.cpp.

◆ isSimpleTerm()

bool Lima::Common::BagOfWords::IndexElement::isSimpleTerm ( ) const

Definition at line 222 of file indexElement.cpp.

◆ operator=()

IndexElement & Lima::Common::BagOfWords::IndexElement::operator= ( const IndexElement &  ie)

Definition at line 185 of file indexElement.cpp.

◆ operator==()

bool Lima::Common::BagOfWords::IndexElement::operator== ( const IndexElement &  other) const

equality operator just compare content, not positions

Definition at line 199 of file indexElement.cpp.

◆ setCategory()

void Lima::Common::BagOfWords::IndexElement::setCategory ( LinguisticCode  category)

Definition at line 256 of file indexElement.cpp.

◆ setId()

void Lima::Common::BagOfWords::IndexElement::setId ( const uint64_t  id)

Definition at line 252 of file indexElement.cpp.

◆ setSimpleTerm()

void Lima::Common::BagOfWords::IndexElement::setSimpleTerm ( const LimaString &  t)

Definition at line 254 of file indexElement.cpp.

◆ setStructure()

void Lima::Common::BagOfWords::IndexElement::setStructure ( const std::vector< uint64_t > &  s,
const std::vector< uint64_t > &  r 
)

Definition at line 258 of file indexElement.cpp.

Friends And Related Symbol Documentation

◆ operator<< [1/3]

LIMA_BOW_EXPORT QDebug & operator<< ( QDebug &  os,
const IndexElement &  elt 
)
friend

Definition at line 378 of file indexElement.cpp.

◆ operator<< [2/3]

LIMA_BOW_EXPORT QTextStream & operator<< ( QTextStream &  os,
const IndexElement &  elt 
)
friend

Definition at line 412 of file indexElement.cpp.

◆ operator<< [3/3]

LIMA_BOW_EXPORT std::ostream & operator<< ( std::ostream &  os,
const IndexElement &  elt 
)
friend

Definition at line 337 of file indexElement.cpp.


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