LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat > Class Template Reference

#include </home/runner/work/lima/lima/deeplima/libs/nn/common/word_seq_vectorizer.h>

Inheritance diagram for deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >:
deeplima::vectorizers::WordSeqEmbdVectorizer< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixFloat, Idx >

Classes

struct  embeddable_feature_descr_t

Public Types

typedef vectorizers::WordSeqEmbdVectorizer< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixFloat > Parent
typedef std::pair< std::shared_ptr< MatrixInt >, std::shared_ptr< MatrixFloat > > vectorization_t
Public Types inherited from deeplima::vectorizers::WordSeqEmbdVectorizer< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixFloat, Idx >
enum  feature_type_t : unsigned char { int_feature = 0 , str_feature = 1 , float_feature = 2 , max_feature }
typedef DataSet dataset_t
typedef DataSet::token_t token_t
typedef UIntFeatExtractor uint_feat_extractor_t

Public Member Functions

 WordSeqVectorizerImpl (const std::vector< typename Parent::feature_descr_t > &features, const std::vector< embeddable_feature_descr_t > &embeddable_features)
 WordSeqVectorizerImpl (const std::vector< typename Parent::feature_descr_t > &features, const std::vector< embeddable_feature_descr_t > &embeddable_features, const StrFeatExtractor &str_feat_extractor)
const std::vector< deeplima::nets::embd_descr_t > get_embd_descr () const
vectorization_t process (const DataSet &src)
vectorization_t init_dst (uint64_t len) const
void process (const DataSet &src, vectorization_t dst, uint64_t start) const
void vectorize_timepoint (MatrixFloat &frozen_features, MatrixInt &embeddable_features, uint64_t timepoint, const typename DataSet::token_t &token) const
Public Member Functions inherited from deeplima::vectorizers::WordSeqEmbdVectorizer< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixFloat, Idx >
void set_model (void *)
 WordSeqEmbdVectorizer ()
 WordSeqEmbdVectorizer (const std::vector< feature_descr_t > &features)
 WordSeqEmbdVectorizer (const std::vector< feature_descr_t > &features, const StrFeatExtractor &str_feat_extractor)
bool is_precomputing () const
void precompute (const DataSet &)
UIntFeatExtractor & get_uint_feat_extractor ()
void init_features (const std::vector< feature_descr_t > &features)
int dim () const
void vectorize_timepoint (MatrixFloat &target, uint64_t timepoint, const typename DataSet::token_t &token) const

Protected Attributes

std::vector< embeddable_feature_descr_t > m_embeddable_features
int m_embeddable_size
Protected Attributes inherited from deeplima::vectorizers::WordSeqEmbdVectorizer< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixFloat, Idx >
std::vector< feature_descr_t > m_features
int m_features_size
std::vector< uint32_t > m_features_pos
const StrFeatExtractor m_str_feat_extractor
UIntFeatExtractor m_uint_feat_extractor
std::vector< std::pair< std::shared_ptr< uint_vectorizer_t >, size_t > > m_uint_vectorizers
std::vector< std::pair< std::shared_ptr< str_vectorizer_t >, size_t > > m_str_vectorizers

Additional Inherited Members

Protected Types inherited from deeplima::vectorizers::WordSeqEmbdVectorizer< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixFloat, Idx >
typedef FeatureVectorizerToMatrix< MatrixFloat, uint64_t, Idx > uint_vectorizer_t
typedef FeatureVectorizerToMatrix< MatrixFloat, const std::string &, Idx > str_vectorizer_t

Detailed Description

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
class deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >

Definition at line 23 of file word_seq_vectorizer.h.

Member Typedef Documentation

◆ Parent

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
typedef vectorizers::WordSeqEmbdVectorizer<DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixFloat> deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::Parent

Definition at line 26 of file word_seq_vectorizer.h.

◆ vectorization_t

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
typedef std::pair<std::shared_ptr<MatrixInt>, std::shared_ptr<MatrixFloat> > deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::vectorization_t

Definition at line 74 of file word_seq_vectorizer.h.

Constructor & Destructor Documentation

◆ WordSeqVectorizerImpl() [1/2]

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::WordSeqVectorizerImpl ( const std::vector< typename Parent::feature_descr_t > & features,
const std::vector< embeddable_feature_descr_t > & embeddable_features )
inline

Definition at line 43 of file word_seq_vectorizer.h.

◆ WordSeqVectorizerImpl() [2/2]

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::WordSeqVectorizerImpl ( const std::vector< typename Parent::feature_descr_t > & features,
const std::vector< embeddable_feature_descr_t > & embeddable_features,
const StrFeatExtractor & str_feat_extractor )
inline

Definition at line 52 of file word_seq_vectorizer.h.

Member Function Documentation

◆ get_embd_descr()

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
const std::vector< deeplima::nets::embd_descr_t > deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::get_embd_descr ( ) const
inline

Definition at line 62 of file word_seq_vectorizer.h.

◆ init_dst()

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
vectorization_t deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::init_dst ( uint64_t len) const
inline

Definition at line 99 of file word_seq_vectorizer.h.

◆ process() [1/2]

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
vectorization_t deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::process ( const DataSet & src)
inline

Definition at line 76 of file word_seq_vectorizer.h.

◆ process() [2/2]

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
void deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::process ( const DataSet & src,
vectorization_t dst,
uint64_t start ) const
inline

Definition at line 108 of file word_seq_vectorizer.h.

◆ vectorize_timepoint()

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
void deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::vectorize_timepoint ( MatrixFloat & frozen_features,
MatrixInt & embeddable_features,
uint64_t timepoint,
const typename DataSet::token_t & token ) const
inline

Definition at line 135 of file word_seq_vectorizer.h.

Member Data Documentation

◆ m_embeddable_features

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
std::vector<embeddable_feature_descr_t> deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::m_embeddable_features
protected

Definition at line 37 of file word_seq_vectorizer.h.

◆ m_embeddable_size

template<class DataSet, class StrFeatExtractor, class UIntFeatExtractor, class MatrixInt, class MatrixFloat>
int deeplima::nets::WordSeqVectorizerImpl< DataSet, StrFeatExtractor, UIntFeatExtractor, MatrixInt, MatrixFloat >::m_embeddable_size
protected

Definition at line 39 of file word_seq_vectorizer.h.


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