LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
deeplima::CoNLLU::Annotation Class Reference

#include </home/runner/work/lima/lima/deeplima/libs/conllu/treebank.h>

Classes

struct  token_t
 
struct  word_t
 

Public Types

typedef std::vector< token_t >::const_iterator tokens_const_iterator
 
typedef std::vector< word_t >::const_iterator words_const_iterator
 

Public Member Functions

 Annotation ()
 
void load (const std::string &fn)
 
void load (std::istream &input)
 
const Sentence & get_sentence (size_t idx) const
 
size_t get_num_sentences () const
 
const std::vector< token_t > & get_tokens () const
 
const std::vector< word_t > & get_words () const
 
tokens_const_iterator tokens_begin () const
 
tokens_const_iterator tokens_end () const
 
const std::vector< word_t > & words () const
 
words_const_iterator words_begin () const
 
words_const_iterator words_end () const
 
const CoNLLULine & get_line (size_t line_idx) const
 

Protected Member Functions

void rebuild_structure (size_t num_sentences, size_t num_tokens, size_t num_words)
 
bool test_structure () const
 

Protected Attributes

std::vector< CoNLLULine > m_lines
 
Document * m_pdoc
 
std::vector< token_t > m_tokens
 
std::vector< word_t > m_words
 
std::vector< Sentence > m_sentences
 

Friends

class Treebank
 

Detailed Description

Definition at line 84 of file treebank.h.

Member Typedef Documentation

◆ tokens_const_iterator

typedef std::vector<token_t>::const_iterator deeplima::CoNLLU::Annotation::tokens_const_iterator

Definition at line 157 of file treebank.h.

◆ words_const_iterator

typedef std::vector<word_t>::const_iterator deeplima::CoNLLU::Annotation::words_const_iterator

Definition at line 173 of file treebank.h.

Constructor & Destructor Documentation

◆ Annotation()

deeplima::CoNLLU::Annotation::Annotation ( )
inline

Definition at line 136 of file treebank.h.

Member Function Documentation

◆ get_line()

const CoNLLULine & deeplima::CoNLLU::Annotation::get_line ( size_t  line_idx) const
inline

Definition at line 184 of file treebank.h.

◆ get_num_sentences()

size_t deeplima::CoNLLU::Annotation::get_num_sentences ( ) const
inline

Definition at line 142 of file treebank.h.

◆ get_sentence()

const Sentence & deeplima::CoNLLU::Annotation::get_sentence ( size_t  idx) const

Definition at line 380 of file treebank.cpp.

◆ get_tokens()

const std::vector< token_t > & deeplima::CoNLLU::Annotation::get_tokens ( ) const
inline

Definition at line 147 of file treebank.h.

◆ get_words()

const std::vector< word_t > & deeplima::CoNLLU::Annotation::get_words ( ) const
inline

Definition at line 152 of file treebank.h.

◆ load() [1/2]

void deeplima::CoNLLU::Annotation::load ( const std::string &  fn)

Definition at line 91 of file treebank.cpp.

◆ load() [2/2]

void deeplima::CoNLLU::Annotation::load ( std::istream &  input)

Definition at line 111 of file treebank.cpp.

◆ rebuild_structure()

void deeplima::CoNLLU::Annotation::rebuild_structure ( size_t  num_sentences,
size_t  num_tokens,
size_t  num_words 
)
protected

Definition at line 171 of file treebank.cpp.

◆ test_structure()

bool deeplima::CoNLLU::Annotation::test_structure ( ) const
protected

Definition at line 293 of file treebank.cpp.

◆ tokens_begin()

tokens_const_iterator deeplima::CoNLLU::Annotation::tokens_begin ( ) const
inline

Definition at line 158 of file treebank.h.

◆ tokens_end()

tokens_const_iterator deeplima::CoNLLU::Annotation::tokens_end ( ) const
inline

Definition at line 163 of file treebank.h.

◆ words()

const std::vector< word_t > & deeplima::CoNLLU::Annotation::words ( ) const
inline

Definition at line 168 of file treebank.h.

◆ words_begin()

words_const_iterator deeplima::CoNLLU::Annotation::words_begin ( ) const
inline

Definition at line 174 of file treebank.h.

◆ words_end()

words_const_iterator deeplima::CoNLLU::Annotation::words_end ( ) const
inline

Definition at line 179 of file treebank.h.

Friends And Related Symbol Documentation

◆ Treebank

friend class Treebank
friend

Definition at line 201 of file treebank.h.

Member Data Documentation

◆ m_lines

std::vector<CoNLLULine> deeplima::CoNLLU::Annotation::m_lines
protected

Definition at line 194 of file treebank.h.

◆ m_pdoc

Document* deeplima::CoNLLU::Annotation::m_pdoc
protected

Definition at line 196 of file treebank.h.

◆ m_sentences

std::vector<Sentence> deeplima::CoNLLU::Annotation::m_sentences
protected

Definition at line 199 of file treebank.h.

◆ m_tokens

std::vector<token_t> deeplima::CoNLLU::Annotation::m_tokens
protected

Definition at line 197 of file treebank.h.

◆ m_words

std::vector<word_t> deeplima::CoNLLU::Annotation::m_words
protected

Definition at line 198 of file treebank.h.


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