![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
#include <deeplima/token_sequence_analyzer.h>
Classes | |
| class | enriched_token_buffer_t |
| class | enriched_token_t |
| struct | lemm_cache_key_hash |
| class | TokenIterator |
Public Types | |
| typedef TokenIterator | output_iterator_t |
Public Types inherited from deeplima::ITokenSequenceAnalyzer | |
| typedef std::function< void(std::shared_ptr< StringIndex > stridx, const token_buffer_t<> &tokens, const std::vector< StringIndex::idx_t > &lemmata, std::shared_ptr< StdMatrix< uint8_t > > classes, size_t begin, size_t end) > | output_callback_t |
Public Member Functions | |
| TokenSequenceAnalyzer () | |
| TokenSequenceAnalyzer (const std::string &model_fn, const std::string &lemm_model_fn, const std::string &lemm_dict_fn, const std::string &fixed_ini_fn, const std::string &lower_ini_fn, const std::string &fixed_lemm_fn, const PathResolver &path_resolver, size_t buffer_size, size_t num_buffers) | |
| void | get_classes_from_fn (const std::string &fn, std::vector< std::string > &classes_names, std::vector< std::vector< std::string > > &classes) |
| virtual | ~TokenSequenceAnalyzer () |
| virtual void | register_handler (const output_callback_t fn) override |
| virtual const std::vector< std::vector< std::string > > & | get_classes () const override |
| virtual const std::vector< std::string > & | get_class_names () const override |
| virtual std::shared_ptr< StringIndex > | get_stridx () const override |
| virtual void | finalize () override |
| virtual void | operator() (const std::vector< deeplima::segmentation::token_pos > &tokens, uint32_t len) override |
Protected Types | |
| typedef std::pair< StringIndex::idx_t, morph_model::morph_feats_t > | lemm_cache_key_t |
Protected Member Functions | |
| void | acquire_buffer () |
| void | start_analysis (size_t buffer_idx, int count=-1) |
| void | process_buffer (size_t buffer_idx) |
| void | load_lemm_cache (const std::string &fn) |
| std::unordered_set< morph_model::morph_feats_t > | load_pos_cache (const std::string &fn) |
| void | lemmatize (const token_buffer_t<> &buffer, std::vector< StringIndex::idx_t > &lemm_buffer, std::shared_ptr< StdMatrix< uint8_t > > classes, size_t offset, size_t end) |
| TODO correct this function. | |
Static Protected Member Functions | |
| static std::u32string | to_lower (const std::u32string &src) |
| This well lower onlu Latin1 characters. | |
Protected Attributes | |
| size_t | m_buffer_size |
| size_t | m_current_buffer |
| size_t | m_current_timepoint |
| std::shared_ptr< StringIndex > | m_stridx_ptr |
| StringIndex & | m_stridx |
| StringIndex::idx_t | m_unk_idx |
| std::vector< token_buffer_t<> > | m_buffers |
| std::vector< std::vector< StringIndex::idx_t > > | m_lemm_buffers |
| tagging::impl::TaggingImpl< TaggingAuxScalar > | m_cls |
| lemmatization::impl::LemmatizationImpl | m_lemm |
| std::shared_ptr< StdMatrix< uint8_t > > | m_classes |
| std::unordered_map< lemm_cache_key_t, StringIndex::idx_t, lemm_cache_key_hash > | m_lemm_cache |
| std::unordered_set< morph_model::morph_feats_t > | m_fixed_ini_cache |
| std::unordered_set< morph_model::morph_feats_t > | m_lower_ini_cache |
| std::unordered_set< morph_model::morph_feats_t > | m_fixed_lemm_cache |
| output_callback_t | m_output_callback |
Definition at line 77 of file token_sequence_analyzer.h.
|
protected |
Definition at line 552 of file token_sequence_analyzer.h.
| typedef TokenIterator deeplima::TokenSequenceAnalyzer< TaggingAuxScalar >::output_iterator_t |
Definition at line 202 of file token_sequence_analyzer.h.
|
inline |
Definition at line 293 of file token_sequence_analyzer.h.
|
inline |
Definition at line 303 of file token_sequence_analyzer.h.
|
inlinevirtual |
Definition at line 424 of file token_sequence_analyzer.h.
|
inlineprotected |
Definition at line 519 of file token_sequence_analyzer.h.
|
inlineoverridevirtual |
Implements deeplima::ITokenSequenceAnalyzer.
Definition at line 456 of file token_sequence_analyzer.h.
|
inlineoverridevirtual |
Implements deeplima::ITokenSequenceAnalyzer.
Definition at line 439 of file token_sequence_analyzer.h.
|
inlineoverridevirtual |
Implements deeplima::ITokenSequenceAnalyzer.
Definition at line 434 of file token_sequence_analyzer.h.
|
inline |
Definition at line 417 of file token_sequence_analyzer.h.
|
inlineoverridevirtual |
Implements deeplima::ITokenSequenceAnalyzer.
Definition at line 444 of file token_sequence_analyzer.h.
|
inlineprotected |
TODO correct this function.
It currently returns only empty strings TODO use this function instead of the one above as soon as it is corrected
Definition at line 677 of file token_sequence_analyzer.h.
|
inlineprotected |
Definition at line 560 of file token_sequence_analyzer.h.
|
inlineprotected |
Definition at line 617 of file token_sequence_analyzer.h.
|
inlineoverridevirtual |
Implements deeplima::ITokenSequenceAnalyzer.
Definition at line 478 of file token_sequence_analyzer.h.
|
inlineprotected |
Definition at line 546 of file token_sequence_analyzer.h.
|
inlineoverridevirtual |
Implements deeplima::ITokenSequenceAnalyzer.
Definition at line 428 of file token_sequence_analyzer.h.
|
inlineprotected |
Definition at line 536 of file token_sequence_analyzer.h.
|
inlinestaticprotected |
This well lower onlu Latin1 characters.
Definition at line 646 of file token_sequence_analyzer.h.
|
protected |
Definition at line 746 of file token_sequence_analyzer.h.
|
protected |
Definition at line 753 of file token_sequence_analyzer.h.
|
protected |
Definition at line 758 of file token_sequence_analyzer.h.
|
protected |
Definition at line 756 of file token_sequence_analyzer.h.
|
protected |
Definition at line 747 of file token_sequence_analyzer.h.
|
protected |
Definition at line 748 of file token_sequence_analyzer.h.
|
protected |
Definition at line 765 of file token_sequence_analyzer.h.
|
protected |
Definition at line 767 of file token_sequence_analyzer.h.
|
protected |
Definition at line 757 of file token_sequence_analyzer.h.
|
protected |
Definition at line 754 of file token_sequence_analyzer.h.
|
protected |
Definition at line 760 of file token_sequence_analyzer.h.
|
protected |
Definition at line 766 of file token_sequence_analyzer.h.
|
protected |
Definition at line 769 of file token_sequence_analyzer.h.
|
protected |
Definition at line 751 of file token_sequence_analyzer.h.
|
protected |
Definition at line 750 of file token_sequence_analyzer.h.
|
protected |
Definition at line 752 of file token_sequence_analyzer.h.