Concordia
TokenAnnotation Class Reference

#include <token_annotation.hpp>

Inheritance diagram for TokenAnnotation:
Collaboration diagram for TokenAnnotation:

Public Member Functions

 TokenAnnotation (const SUFFIX_MARKER_TYPE start, const SUFFIX_MARKER_TYPE end, const int annotationType, const std::string &value)
 
virtual ~TokenAnnotation ()
 
int getType () const
 
std::string getValue () const
 
- Public Member Functions inherited from Interval
 Interval (const SUFFIX_MARKER_TYPE start, const SUFFIX_MARKER_TYPE end)
 
virtual ~Interval ()
 
bool intersects (Interval &interval)
 
bool contains (Interval &interval)
 
SUFFIX_MARKER_TYPE getLength ()
 
SUFFIX_MARKER_TYPE getStart () const
 
SUFFIX_MARKER_TYPE getEnd () const
 

Static Public Attributes

static int NE = 0
 
static int WORD = 1
 
static int HTML_TAG = 2
 
static int STOP_WORD = 3
 

Detailed Description

Class representing annotation of char sequence as a token. It is a type of interval that is also storing information about the annoation type and value.

Constructor & Destructor Documentation

TokenAnnotation::TokenAnnotation ( const SUFFIX_MARKER_TYPE  start,
const SUFFIX_MARKER_TYPE  end,
const int  annotationType,
const std::string &  value 
)

Constructor.

Parameters
startstart index of the annotation (char-level, 0-based)
endend index of the annotation (char-level, 0-based)
annotationTypeannotation type
valueannotation value
TokenAnnotation::~TokenAnnotation ( )
virtual

Destructor.

Member Function Documentation

int TokenAnnotation::getType ( ) const
inline

Getter for annotation type.

Returns
annotation type

Here is the caller graph for this function:

std::string TokenAnnotation::getValue ( ) const
inline

Getter for annotation value.

Returns
annotation value

Here is the caller graph for this function:

Member Data Documentation

int TokenAnnotation::HTML_TAG = 2
static

Html tag annotation type

int TokenAnnotation::NE = 0
static

Named entity annotation type

int TokenAnnotation::STOP_WORD = 3
static

Stop word annotation type

int TokenAnnotation::WORD = 1
static

Word annotation type


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