![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
#include <deeplima/lemmatization/impl/lemmatization_impl.h>
Public Member Functions | |
| LemmatizationImpl () | |
| LemmatizationImpl (size_t threads, size_t buffer_size_per_thread) | |
| virtual | ~LemmatizationImpl ()=default |
| virtual void | load (const std::string &fn, const PathResolver &) |
| void | init (size_t max_input_word_len, const std::vector< std::string > &class_names, const std::vector< std::vector< std::string > > &class_values) |
| bool | is_fixed (std::shared_ptr< StdMatrix< uint8_t > > classes, size_t idx) |
| morph_model::morph_feats_t | get_morph_feats (std::shared_ptr< StdMatrix< uint8_t > > classes, size_t idx) const |
| void | predict (const std::u32string &form, std::shared_ptr< StdMatrix< uint8_t > > classes, size_t idx, std::u32string &target) |
Public Member Functions inherited from deeplima::RnnSeq2Seq | |
| std::shared_ptr< StdMatrix< uint8_t > > | get_output () |
| RnnSeq2Seq () | |
| void | init (uint32_t, uint32_t, uint32_t, uint32_t, uint32_t) |
| void | load (const std::string &fn) |
| virtual | ~RnnSeq2Seq () |
Public Member Functions inherited from deeplima::eigen_wrp::EigenMatrix< M > | |
| EigenMatrix () | |
| EigenMatrix (int64_t max_time, int64_t max_feat) | |
| void | init (int64_t max_time, int64_t max_feat) |
| void | set (uint64_t time, uint64_t feat, value_t value) |
| void | set (uint64_t time, EigenMatrix< M > &src, uint64_t src_time) |
| value_t | get (uint64_t time, uint64_t feat) |
| uint64_t | size () const |
| uint64_t | get_max_feat () const |
| const M & | get_tensor () const |
Public Member Functions inherited from deeplima::lemmatization::eigen_impl::BiRnnSeq2SeqEigenInferenceForLemmatization | |
| virtual | ~BiRnnSeq2SeqEigenInferenceForLemmatization ()=default |
| virtual size_t | init_new_worker (size_t input_len, bool precomputed_input=false) override |
| virtual size_t | get_precomputed_dim () const |
| virtual void | precompute_inputs (const Eigen::MatrixXf &inputs, Eigen::MatrixXf &outputs, int64_t input_size) override |
| virtual void | predict (size_t, const Eigen::MatrixXf &, int64_t, int64_t, int64_t, int64_t, std::shared_ptr< StdMatrix< uint8_t > > &, const std::vector< std::string > &) override |
| virtual void | predict (size_t worker_id, const Eigen::MatrixXf &inputs, const Eigen::MatrixXf &input_feats, int64_t input_len, int64_t output_max_len, int64_t, std::vector< uint32_t > &output, const std::vector< std::string > &) |
| const std::vector< std::vector< std::string > > & | get_classes () const |
| const std::vector< std::string > & | get_class_names () const |
| const morph_model::morph_model_t & | get_morph_model () const |
| const std::string & | get_embd_fn (size_t idx) const |
| const std::vector< size_t > & | get_fixed_upos () const |
Public Member Functions inherited from deeplima::eigen_impl::BiRnnInferenceBase | |
| virtual | ~BiRnnInferenceBase ()=default |
| const uint_dicts_holder_t & | get_input_uint_dicts () const |
| const std::vector< std::string > & | get_input_uint_dicts_names () const |
| const str_dicts_holder_t & | get_input_str_dicts () const |
| const std::vector< std::string > & | get_input_str_dicts_names () const |
| const std::vector< std::vector< std::string > > & | get_output_str_dicts () const |
| const std::vector< std::string > & | get_output_str_dicts_names () const |
Protected Attributes | |
| size_t | m_beam_size |
| size_t | m_max_input_word_len = 0 |
| max word length the encoder workbench / vectorizer were sized for (see init) | |
| EmbdVectorizer | m_vectorizer |
| EmbdVectorizer | m_feat_vectorizer |
| std::vector< size_t > | m_feat2cls |
| size_t | m_upos_idx |
| index in the features matrix of the upos line | |
| std::vector< bool > | m_fixed_upos |
| index i is true if upos whose index is i is considered as fixed | |
Protected Attributes inherited from deeplima::eigen_wrp::EigenMatrix< M > | |
| int64_t | m_start_time |
| int64_t | m_max_time |
| M | m_tensor |
Protected Attributes inherited from deeplima::lemmatization::eigen_impl::BiRnnSeq2SeqEigenInferenceForLemmatization | |
| std::vector< std::string > | m_class_names |
| std::vector< std::vector< std::string > > | m_classes |
| std::vector< std::string > | m_embd_fn |
| morph_model::morph_model_t | m_morph_model |
| std::vector< size_t > | m_fixed_upos |
| std::vector< std::shared_ptr< workbench_t > > | m_workbenches |
Protected Attributes inherited from deeplima::eigen_impl::BiRnnInferenceBase | |
| std::vector< std::shared_ptr< Op_Base > > | m_ops |
| std::vector< std::shared_ptr< param_base_t > > | m_params |
| std::vector< std::vector< std::shared_ptr< Op_Base::workbench_t > > > | m_wb |
| uint_dicts_holder_t | m_input_uint_dicts |
| std::vector< std::string > | m_input_uint_dicts_names |
| str_dicts_holder_t | m_input_str_dicts |
| std::vector< std::string > | m_input_str_dicts_names |
| std::vector< std::vector< std::string > > | m_output_str_dicts |
| std::vector< std::string > | m_output_str_dicts_names |
| std::vector< params_bilstm_spec_t > | m_lstm |
| std::map< std::string, size_t > | m_lstm_idx |
| std::vector< std::shared_ptr< params_multilayer_bilstm_spec_t > > | m_multi_bilstm |
| std::map< std::string, size_t > | m_multi_bilstm_idx |
| std::vector< params_linear_t< Eigen::MatrixXf, Eigen::VectorXf > > | m_linear |
| std::map< std::string, size_t > | m_linear_idx |
Definition at line 26 of file lemmatization_impl.h.
| deeplima::lemmatization::impl::LemmatizationImpl::LemmatizationImpl | ( | ) |
Definition at line 11 of file lemmatization_impl.cpp.
| deeplima::lemmatization::impl::LemmatizationImpl::LemmatizationImpl | ( | size_t | threads, |
| size_t | buffer_size_per_thread | ||
| ) |
Definition at line 16 of file lemmatization_impl.cpp.
|
virtualdefault |
| morph_model::morph_feats_t deeplima::lemmatization::impl::LemmatizationImpl::get_morph_feats | ( | std::shared_ptr< StdMatrix< uint8_t > > | classes, |
| size_t | idx | ||
| ) | const |
Definition at line 127 of file lemmatization_impl.cpp.
| void deeplima::lemmatization::impl::LemmatizationImpl::init | ( | size_t | max_input_word_len, |
| const std::vector< std::string > & | class_names, | ||
| const std::vector< std::vector< std::string > > & | class_values | ||
| ) |
Definition at line 39 of file lemmatization_impl.cpp.
| bool deeplima::lemmatization::impl::LemmatizationImpl::is_fixed | ( | std::shared_ptr< StdMatrix< uint8_t > > | classes, |
| size_t | idx | ||
| ) |
| idx | is fixed in the features matrix |
| classes. | The upos line in the matrix is given by the member m_upos_idx. |
Definition at line 120 of file lemmatization_impl.cpp.
|
virtual |
Definition at line 26 of file lemmatization_impl.cpp.
| void deeplima::lemmatization::impl::LemmatizationImpl::predict | ( | const std::u32string & | form, |
| std::shared_ptr< StdMatrix< uint8_t > > | classes, | ||
| size_t | idx, | ||
| std::u32string & | target | ||
| ) |
Definition at line 153 of file lemmatization_impl.cpp.
|
protected |
Definition at line 58 of file lemmatization_impl.h.
|
protected |
Definition at line 63 of file lemmatization_impl.h.
|
protected |
Definition at line 62 of file lemmatization_impl.h.
|
protected |
index i is true if upos whose index is i is considered as fixed
Definition at line 67 of file lemmatization_impl.h.
|
protected |
max word length the encoder workbench / vectorizer were sized for (see init)
Definition at line 60 of file lemmatization_impl.h.
|
protected |
index in the features matrix of the upos line
Definition at line 65 of file lemmatization_impl.h.
|
protected |
Definition at line 61 of file lemmatization_impl.h.