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

This class is used to type the relation between a part and its enclosing complex token. More...

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

Public Member Functions

 BoWRelation (const Lima::LimaString &realization, uint64_t type)
 BoWRelation (const Lima::LimaString &realization, uint64_t type, uint64_t syntype)
 BoWRelation (const BoWRelation &tok)
 BoWRelation ()
virtual ~BoWRelation ()
virtual BoWRelation * clone () const
virtual Lima::LimaString getRealization (void) const
uint64_t getType (void) const
uint64_t getSynType (void) const
void setType (uint64_t type)
void setSynType (uint64_t type)
Lima::LimaString getString (void) const
virtual void read (std::istream &file)
virtual void write (std::ostream &file) const
virtual std::string getOutputUTF8String (void) const
 get a string of the BoWRelation for output function
virtual std::string getIdUTF8String () const
 function used to identify a bowtoken in a text (used in BowDumper)
virtual void parse (const Lima::LimaString &str, int current)
 for parsing of input stream
bool operator== (const BoWRelation &) const
 redefine equality
bool operator!= (const BoWRelation &) const
 redefine inequality as negation of equality.

Static Public Member Functions

static void setUseOnlyRealization (const bool b)
static bool getUseOnlyRealization ()
static void setCompoundSeparator (const LimaChar c)
static LimaChar getCompoundSeparator ()
static Lima::LimaString findNextElement (const Lima::LimaString &str, int &current, const LimaChar &separator)

Protected Member Functions

void convertSpaces (void)
 convert the spaces in the realization string into a non-space character (defined by the m_compoundSeparator member)

Protected Attributes

Lima::LimaString m_realization
uint64_t m_type
uint64_t s_type

Static Protected Attributes

static LimaChar m_separator =DEFAULT_SEPARATOR
static LimaChar m_compoundSeparator =DEFAULT_COMPOUND_SEPARATOR
static bool m_useOnlyRealization =false

Friends

LIMA_BOW_EXPORT std::ostream & operator<< (std::ostream &os, const BoWRelation &rel)
LIMA_BOW_EXPORT QDebug & operator<< (QDebug &os, const BoWRelation &rel)

Detailed Description

This class is used to type the relation between a part and its enclosing complex token.

This will be used primarily to represent the type of the relation in compounds but could be later be used as the basis to more structured indexing

Definition at line 49 of file BoWRelation.h.

Constructor & Destructor Documentation

◆ BoWRelation() [1/4]

Lima::Common::BagOfWords::BoWRelation::BoWRelation ( const Lima::LimaString & realization,
uint64_t type )

◆ BoWRelation() [2/4]

Lima::Common::BagOfWords::BoWRelation::BoWRelation ( const Lima::LimaString & realization,
uint64_t type,
uint64_t syntype )

◆ BoWRelation() [3/4]

Lima::Common::BagOfWords::BoWRelation::BoWRelation ( const BoWRelation & tok)

Definition at line 78 of file BoWRelation.cpp.

◆ BoWRelation() [4/4]

Lima::Common::BagOfWords::BoWRelation::BoWRelation ( )

Definition at line 48 of file BoWRelation.cpp.

◆ ~BoWRelation()

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

Definition at line 91 of file BoWRelation.cpp.

Member Function Documentation

◆ clone()

BoWRelation * Lima::Common::BagOfWords::BoWRelation::clone ( ) const
inlinevirtual

Definition at line 159 of file BoWRelation.h.

◆ convertSpaces()

void Lima::Common::BagOfWords::BoWRelation::convertSpaces ( void )
protected

convert the spaces in the realization string into a non-space character (defined by the m_compoundSeparator member)

Definition at line 121 of file BoWRelation.cpp.

◆ findNextElement()

LimaString Lima::Common::BagOfWords::BoWRelation::findNextElement ( const Lima::LimaString & str,
int & current,
const LimaChar & separator )
static

Definition at line 154 of file BoWRelation.cpp.

◆ getCompoundSeparator()

LimaChar Lima::Common::BagOfWords::BoWRelation::getCompoundSeparator ( )
inlinestatic

Definition at line 154 of file BoWRelation.h.

◆ getIdUTF8String()

std::string Lima::Common::BagOfWords::BoWRelation::getIdUTF8String ( ) const
virtual

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

Definition at line 230 of file BoWRelation.cpp.

◆ getOutputUTF8String()

std::string Lima::Common::BagOfWords::BoWRelation::getOutputUTF8String ( void ) const
virtual

get a string of the BoWRelation for output function

Definition at line 222 of file BoWRelation.cpp.

◆ getRealization()

virtual Lima::LimaString Lima::Common::BagOfWords::BoWRelation::getRealization ( void ) const
inlinevirtual

Definition at line 65 of file BoWRelation.h.

◆ getString()

LimaString Lima::Common::BagOfWords::BoWRelation::getString ( void ) const

Definition at line 98 of file BoWRelation.cpp.

◆ getSynType()

uint64_t Lima::Common::BagOfWords::BoWRelation::getSynType ( void ) const
inline

Definition at line 67 of file BoWRelation.h.

◆ getType()

uint64_t Lima::Common::BagOfWords::BoWRelation::getType ( void ) const
inline

Definition at line 66 of file BoWRelation.h.

◆ getUseOnlyRealization()

bool Lima::Common::BagOfWords::BoWRelation::getUseOnlyRealization ( )
inlinestatic

Definition at line 77 of file BoWRelation.h.

◆ operator!=()

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

redefine inequality as negation of equality.

Author
Benoit Mathieu

Definition at line 145 of file BoWRelation.cpp.

◆ operator==()

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

redefine equality

Author
Gael de Chalendar return true if :
  • objects have the same type
  • objects have the same realization

Definition at line 138 of file BoWRelation.cpp.

◆ parse()

void Lima::Common::BagOfWords::BoWRelation::parse ( const Lima::LimaString & str,
int current )
virtual

for parsing of input stream

Definition at line 177 of file BoWRelation.cpp.

◆ read()

void Lima::Common::BagOfWords::BoWRelation::read ( std::istream & file)
virtual

Definition at line 188 of file BoWRelation.cpp.

◆ setCompoundSeparator()

void Lima::Common::BagOfWords::BoWRelation::setCompoundSeparator ( const LimaChar c)
inlinestatic

Definition at line 149 of file BoWRelation.h.

◆ setSynType()

void Lima::Common::BagOfWords::BoWRelation::setSynType ( uint64_t type)
inline

Definition at line 72 of file BoWRelation.h.

◆ setType()

void Lima::Common::BagOfWords::BoWRelation::setType ( uint64_t type)
inline

Definition at line 71 of file BoWRelation.h.

◆ setUseOnlyRealization()

void Lima::Common::BagOfWords::BoWRelation::setUseOnlyRealization ( const bool b)
inlinestatic

Definition at line 76 of file BoWRelation.h.

◆ write()

void Lima::Common::BagOfWords::BoWRelation::write ( std::ostream & file) const
virtual

Definition at line 196 of file BoWRelation.cpp.

◆ operator<< [1/2]

LIMA_BOW_EXPORT QDebug & operator<< ( QDebug & os,
const BoWRelation & rel )
friend

Definition at line 212 of file BoWRelation.cpp.

◆ operator<< [2/2]

LIMA_BOW_EXPORT std::ostream & operator<< ( std::ostream & os,
const BoWRelation & rel )
friend

Definition at line 206 of file BoWRelation.cpp.

Member Data Documentation

◆ m_compoundSeparator

LimaChar Lima::Common::BagOfWords::BoWRelation::m_compoundSeparator =DEFAULT_COMPOUND_SEPARATOR
staticprotected

Definition at line 133 of file BoWRelation.h.

◆ m_realization

Lima::LimaString Lima::Common::BagOfWords::BoWRelation::m_realization
protected

Definition at line 128 of file BoWRelation.h.

◆ m_separator

LimaChar Lima::Common::BagOfWords::BoWRelation::m_separator =DEFAULT_SEPARATOR
staticprotected

Definition at line 132 of file BoWRelation.h.

◆ m_type

uint64_t Lima::Common::BagOfWords::BoWRelation::m_type
protected

Definition at line 129 of file BoWRelation.h.

◆ m_useOnlyRealization

bool Lima::Common::BagOfWords::BoWRelation::m_useOnlyRealization =false
staticprotected

Definition at line 135 of file BoWRelation.h.

◆ s_type

uint64_t Lima::Common::BagOfWords::BoWRelation::s_type
protected

Definition at line 131 of file BoWRelation.h.


The documentation for this class was generated from the following files:
  • lima_linguisticprocessing/src/linguisticProcessing/common/BagOfWords/BoWRelation.h
  • lima_linguisticprocessing/src/linguisticProcessing/common/BagOfWords/BoWRelation.cpp