Token Occurrence. More...

#include <gtoken.h>

Public Member Functions

 GTokenOccur (size_t nb)
 
 GTokenOccur (GToken *token, GVector *vector, size_t pos, size_t depth, size_t spos, size_t nb)
 
int Compare (const GTokenOccur &occur) const
 
GTokenGetToken (void) const
 

Private Attributes

GTokenToken
 
GVectorVector
 
R::RContainer< GTokenOccur,
false, false > 
Children
 
size_t Pos
 
size_t Depth
 
size_t SyntacticPos
 
size_t Index
 
double Weight
 

Detailed Description

Token Occurrence.

This class represents an occurrence of a given token. It is only used by GDocAnalyze.

Constructor & Destructor Documentation

GTokenOccur ( size_t  nb)

Occurrence of a null token.

Parameters
nbNumber of possible children.
GTokenOccur ( GToken token,
GVector vector,
size_t  pos,
size_t  depth,
size_t  spos,
size_t  nb 
)

Occurrence of a token.

Parameters
tokenToken associated.
vectorVector.
posPosition.
depthDepth.
sposSyntactic position.
nbNumber of possible children.

Member Function Documentation

int Compare ( const GTokenOccur occur) const

Method needed by R::RContainer. The occurrences are supposed to be ordered in ascending order of their index.

Parameters
occurOccurrence to compare with.
Returns
a value reflecting of a element has a smaller index or not.
GToken* GetToken ( void  ) const
Returns
the corresponding token.

Member Data Documentation

GToken* Token
private

The corresponding token.

GVector* Vector
private

The corresponding meta-vector (meta-concept).

R::RContainer<GTokenOccur,false,false> Children
private

Children of the occurrence.

size_t Pos
private

Position of the occurrence in the document.

size_t Depth
private

Depth of the occurrence in the document.

size_t SyntacticPos
private

Syntactic position of the occurrence in the document.

size_t Index
private

Index of the occurrence in the main container.

double Weight
private

Weight of the occurrence.