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

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

Inheritance diagram for deeplima::CoNLLU::CoNLLULine:
deeplima::ISerializable

Classes

struct  dep_t
 
struct  feature_t
 

Public Member Functions

 CoNLLULine (const std::string &buf, char sep='\t')
 
 CoNLLULine (const Line &line)
 
virtual ~CoNLLULine ()=default
 
virtual void read (const std::string &buf, char sep='\t')
 
virtual std::string write (char sep='\t') const
 
bool is_token_line () const
 
bool is_comment_line () const
 
bool is_empty_line () const
 
bool is_real_word_line () const
 
const idx_t & idx () const
 
const std::string & form () const
 
const std::string & lemma () const
 
const std::string & upos () const
 
const std::string & xpos () const
 
const std::string & deprel () const
 
const std::map< std::string, std::set< std::string > > & feats () const
 
std::string feats_str () const
 
const idx_t & head () const
 
bool get_binary_feature (const std::string &feat_name) const
 
bool is_foreign () const
 
bool is_typo () const
 

Static Public Member Functions

static bool parse_feats (const std::string &s, std::map< std::string, std::set< std::string > > &_feats)
 

Protected Member Functions

virtual void init (const Line &line)
 
void init_impl (const Line &line)
 
void read_impl (const std::string &buf, char sep='\t')
 
bool parse_feats (const std::string &s)
 
bool parse_deps (const std::string &s)
 
bool parse_misc (const std::string &s)
 
bool parse_string_field (const std::string &s, std::string &out, bool raw=false)
 
std::string serialize_feats () const
 
std::string serialize_deps () const
 
std::string serialize_misc () const
 
std::string serialize_string (const std::string &s) const
 

Protected Attributes

bool _empty
 
std::string _comment
 
idx_t _idx
 
std::string _form
 
std::string _lemma
 
std::string _upos
 
std::string _xpos
 
std::map< std::string, std::set< std::string > > _feats
 
idx_t _head
 
std::string _deprel
 
std::vector< dep_t > _deps
 
std::map< std::string, std::string > _misc
 

Detailed Description

Definition at line 82 of file line.h.

Constructor & Destructor Documentation

◆ CoNLLULine() [1/2]

deeplima::CoNLLU::CoNLLULine::CoNLLULine ( const std::string &  buf,
char  sep = '\t' 
)
inlineexplicit

Definition at line 85 of file line.h.

◆ CoNLLULine() [2/2]

deeplima::CoNLLU::CoNLLULine::CoNLLULine ( const Line &  line)
inlineexplicit

Definition at line 90 of file line.h.

◆ ~CoNLLULine()

virtual deeplima::CoNLLU::CoNLLULine::~CoNLLULine ( )
virtualdefault

Member Function Documentation

◆ deprel()

const std::string & deeplima::CoNLLU::CoNLLULine::deprel ( ) const
inline

Definition at line 173 of file line.h.

◆ feats()

const std::map< std::string, std::set< std::string > > & deeplima::CoNLLU::CoNLLULine::feats ( ) const
inline

Definition at line 178 of file line.h.

◆ feats_str()

std::string deeplima::CoNLLU::CoNLLULine::feats_str ( ) const
inline

Definition at line 183 of file line.h.

◆ form()

const std::string & deeplima::CoNLLU::CoNLLULine::form ( ) const
inline

Definition at line 153 of file line.h.

◆ get_binary_feature()

bool deeplima::CoNLLU::CoNLLULine::get_binary_feature ( const std::string &  feat_name) const
inline

Definition at line 193 of file line.h.

◆ head()

const idx_t & deeplima::CoNLLU::CoNLLULine::head ( ) const
inline

Definition at line 188 of file line.h.

◆ idx()

const idx_t & deeplima::CoNLLU::CoNLLULine::idx ( ) const
inline

Definition at line 148 of file line.h.

◆ init()

virtual void deeplima::CoNLLU::CoNLLULine::init ( const Line &  line)
inlineprotectedvirtual

Definition at line 220 of file line.h.

◆ init_impl()

void deeplima::CoNLLU::CoNLLULine::init_impl ( const Line &  line)
protected

Definition at line 82 of file line.cpp.

◆ is_comment_line()

bool deeplima::CoNLLU::CoNLLULine::is_comment_line ( ) const
inline

Definition at line 133 of file line.h.

◆ is_empty_line()

bool deeplima::CoNLLU::CoNLLULine::is_empty_line ( ) const
inline

Definition at line 138 of file line.h.

◆ is_foreign()

bool deeplima::CoNLLU::CoNLLULine::is_foreign ( ) const
inline

Definition at line 207 of file line.h.

◆ is_real_word_line()

bool deeplima::CoNLLU::CoNLLULine::is_real_word_line ( ) const
inline

Definition at line 143 of file line.h.

◆ is_token_line()

bool deeplima::CoNLLU::CoNLLULine::is_token_line ( ) const
inline

Definition at line 128 of file line.h.

◆ is_typo()

bool deeplima::CoNLLU::CoNLLULine::is_typo ( ) const
inline

Definition at line 212 of file line.h.

◆ lemma()

const std::string & deeplima::CoNLLU::CoNLLULine::lemma ( ) const
inline

Definition at line 158 of file line.h.

◆ parse_deps()

bool deeplima::CoNLLU::CoNLLULine::parse_deps ( const std::string &  s)
protected

Definition at line 172 of file line.cpp.

◆ parse_feats() [1/2]

bool deeplima::CoNLLU::CoNLLULine::parse_feats ( const std::string &  s)
protected

Definition at line 167 of file line.cpp.

◆ parse_feats() [2/2]

bool deeplima::CoNLLU::CoNLLULine::parse_feats ( const std::string &  s,
std::map< std::string, std::set< std::string > > &  _feats 
)
static

Definition at line 142 of file line.cpp.

◆ parse_misc()

bool deeplima::CoNLLU::CoNLLULine::parse_misc ( const std::string &  s)
protected

Definition at line 198 of file line.cpp.

◆ parse_string_field()

bool deeplima::CoNLLU::CoNLLULine::parse_string_field ( const std::string &  s,
std::string &  out,
bool  raw = false 
)
protected

Definition at line 236 of file line.cpp.

◆ read()

virtual void deeplima::CoNLLU::CoNLLULine::read ( const std::string &  buf,
char  sep = '\t' 
)
inlinevirtual

Implements deeplima::ISerializable.

Definition at line 98 of file line.h.

◆ read_impl()

void deeplima::CoNLLU::CoNLLULine::read_impl ( const std::string &  buf,
char  sep = '\t' 
)
inlineprotected

Definition at line 227 of file line.h.

◆ serialize_deps()

string deeplima::CoNLLU::CoNLLULine::serialize_deps ( ) const
protected

Definition at line 268 of file line.cpp.

◆ serialize_feats()

string deeplima::CoNLLU::CoNLLULine::serialize_feats ( ) const
protected

Definition at line 250 of file line.cpp.

◆ serialize_misc()

string deeplima::CoNLLU::CoNLLULine::serialize_misc ( ) const
protected

Definition at line 286 of file line.cpp.

◆ serialize_string()

string deeplima::CoNLLU::CoNLLULine::serialize_string ( const std::string &  s) const
protected

Definition at line 304 of file line.cpp.

◆ upos()

const std::string & deeplima::CoNLLU::CoNLLULine::upos ( ) const
inline

Definition at line 163 of file line.h.

◆ write()

string deeplima::CoNLLU::CoNLLULine::write ( char  sep = '\t') const
virtual

Implements deeplima::ISerializable.

Definition at line 53 of file line.cpp.

◆ xpos()

const std::string & deeplima::CoNLLU::CoNLLULine::xpos ( ) const
inline

Definition at line 168 of file line.h.

Member Data Documentation

◆ _comment

std::string deeplima::CoNLLU::CoNLLULine::_comment
protected

Definition at line 250 of file line.h.

◆ _deprel

std::string deeplima::CoNLLU::CoNLLULine::_deprel
protected

Definition at line 274 of file line.h.

◆ _deps

std::vector<dep_t> deeplima::CoNLLU::CoNLLULine::_deps
protected

Definition at line 277 of file line.h.

◆ _empty

bool deeplima::CoNLLU::CoNLLULine::_empty
protected

Definition at line 247 of file line.h.

◆ _feats

std::map<std::string, std::set<std::string> > deeplima::CoNLLU::CoNLLULine::_feats
protected

Definition at line 268 of file line.h.

◆ _form

std::string deeplima::CoNLLU::CoNLLULine::_form
protected

Definition at line 256 of file line.h.

◆ _head

idx_t deeplima::CoNLLU::CoNLLULine::_head
protected

Definition at line 271 of file line.h.

◆ _idx

idx_t deeplima::CoNLLU::CoNLLULine::_idx
protected

Definition at line 253 of file line.h.

◆ _lemma

std::string deeplima::CoNLLU::CoNLLULine::_lemma
protected

Definition at line 259 of file line.h.

◆ _misc

std::map<std::string, std::string> deeplima::CoNLLU::CoNLLULine::_misc
protected

Definition at line 280 of file line.h.

◆ _upos

std::string deeplima::CoNLLU::CoNLLULine::_upos
protected

Definition at line 262 of file line.h.

◆ _xpos

std::string deeplima::CoNLLU::CoNLLULine::_xpos
protected

Definition at line 265 of file line.h.


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