LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
deeplima::ConlluFeatExtractor< Token > Class Template Reference

#include <deeplima/feat_extractors.h>

Public Member Functions

 ConlluFeatExtractor ()=default
 ConlluFeatExtractor (const ConlluFeatExtractor &other)=default
 ConlluFeatExtractor (const std::string &feats_to_train)
void preprocess (const Token &token)
size_t get_feat_id (const std::string &name) const
std::string feat_value (const Token &token, int feat_no) const
bool should_preprocess_feature (int feat_no) const
size_t size () const
std::vector< std::string > feats () const

Static Public Member Functions

static bool needs_preprocessing ()
static std::string missing_as_underscore (const std::string &value)

Protected Member Functions

void add_feature (const std::string &name)

Protected Attributes

std::vector< std::string > m_idx2feat
std::unordered_map< std::string, size_t > m_feat2idx
std::unordered_set< std::string > m_prohibited_feats
std::unordered_set< int > m_dont_preprocess
int m_form = -1
int m_form_lc = -1
int m_upos = -1
int m_xpos = -1
int m_eos = -1
int m_rel = -1
bool m_feats = false

Detailed Description

template<typename Token>
class deeplima::ConlluFeatExtractor< Token >

Definition at line 160 of file feat_extractors.h.

Constructor & Destructor Documentation

◆ ConlluFeatExtractor() [1/3]

template<typename Token>
deeplima::ConlluFeatExtractor< Token >::ConlluFeatExtractor ( )
default

◆ ConlluFeatExtractor() [2/3]

template<typename Token>
deeplima::ConlluFeatExtractor< Token >::ConlluFeatExtractor ( const ConlluFeatExtractor< Token > & other)
default

◆ ConlluFeatExtractor() [3/3]

template<typename Token>
deeplima::ConlluFeatExtractor< Token >::ConlluFeatExtractor ( const std::string & feats_to_train)
inline

Definition at line 187 of file feat_extractors.h.

Member Function Documentation

◆ add_feature()

template<typename Token>
void deeplima::ConlluFeatExtractor< Token >::add_feature ( const std::string & name)
inlineprotected

Definition at line 175 of file feat_extractors.h.

◆ feat_value()

template<typename Token>
std::string deeplima::ConlluFeatExtractor< Token >::feat_value ( const Token & token,
int feat_no ) const
inline

Definition at line 293 of file feat_extractors.h.

◆ feats()

template<typename Token>
std::vector< std::string > deeplima::ConlluFeatExtractor< Token >::feats ( ) const
inline

Definition at line 355 of file feat_extractors.h.

◆ get_feat_id()

template<typename Token>
size_t deeplima::ConlluFeatExtractor< Token >::get_feat_id ( const std::string & name) const
inline

Definition at line 277 of file feat_extractors.h.

◆ missing_as_underscore()

template<typename Token>
std::string deeplima::ConlluFeatExtractor< Token >::missing_as_underscore ( const std::string & value)
inlinestatic

Definition at line 288 of file feat_extractors.h.

◆ needs_preprocessing()

template<typename Token>
bool deeplima::ConlluFeatExtractor< Token >::needs_preprocessing ( )
inlinestatic

Definition at line 253 of file feat_extractors.h.

◆ preprocess()

template<typename Token>
void deeplima::ConlluFeatExtractor< Token >::preprocess ( const Token & token)
inline

Definition at line 258 of file feat_extractors.h.

◆ should_preprocess_feature()

template<typename Token>
bool deeplima::ConlluFeatExtractor< Token >::should_preprocess_feature ( int feat_no) const
inline

Definition at line 345 of file feat_extractors.h.

◆ size()

template<typename Token>
size_t deeplima::ConlluFeatExtractor< Token >::size ( ) const
inline

Definition at line 350 of file feat_extractors.h.

Member Data Documentation

◆ m_dont_preprocess

template<typename Token>
std::unordered_set<int> deeplima::ConlluFeatExtractor< Token >::m_dont_preprocess
protected

Definition at line 166 of file feat_extractors.h.

◆ m_eos

template<typename Token>
int deeplima::ConlluFeatExtractor< Token >::m_eos = -1
protected

Definition at line 171 of file feat_extractors.h.

◆ m_feat2idx

template<typename Token>
std::unordered_map<std::string, size_t> deeplima::ConlluFeatExtractor< Token >::m_feat2idx
protected

Definition at line 164 of file feat_extractors.h.

◆ m_feats

template<typename Token>
bool deeplima::ConlluFeatExtractor< Token >::m_feats = false
protected

Definition at line 173 of file feat_extractors.h.

◆ m_form

template<typename Token>
int deeplima::ConlluFeatExtractor< Token >::m_form = -1
protected

Definition at line 167 of file feat_extractors.h.

◆ m_form_lc

template<typename Token>
int deeplima::ConlluFeatExtractor< Token >::m_form_lc = -1
protected

Definition at line 168 of file feat_extractors.h.

◆ m_idx2feat

template<typename Token>
std::vector<std::string> deeplima::ConlluFeatExtractor< Token >::m_idx2feat
protected

Definition at line 163 of file feat_extractors.h.

◆ m_prohibited_feats

template<typename Token>
std::unordered_set<std::string> deeplima::ConlluFeatExtractor< Token >::m_prohibited_feats
protected

Definition at line 165 of file feat_extractors.h.

◆ m_rel

template<typename Token>
int deeplima::ConlluFeatExtractor< Token >::m_rel = -1
protected

Definition at line 172 of file feat_extractors.h.

◆ m_upos

template<typename Token>
int deeplima::ConlluFeatExtractor< Token >::m_upos = -1
protected

Definition at line 169 of file feat_extractors.h.

◆ m_xpos

template<typename Token>
int deeplima::ConlluFeatExtractor< Token >::m_xpos = -1
protected

Definition at line 170 of file feat_extractors.h.


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