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 |
GToken * | GetToken (void) const |
Private Attributes | |
GToken * | Token |
GVector * | Vector |
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
-
nb Number 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
-
token Token associated. vector Vector. pos Position. depth Depth. spos Syntactic position. nb Number 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
-
occur Occurrence 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
|
private |
The corresponding token.
|
private |
The corresponding meta-vector (meta-concept).
|
private |
Children of the occurrence.
|
private |
Position of the occurrence in the document.
|
private |
Depth of the occurrence in the document.
|
private |
Syntactic position of the occurrence in the document.
|
private |
Index of the occurrence in the main container.
|
private |
Weight of the occurrence.