![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
#include <deeplima/dependency_parser.h>
Public Types | |
| typedef std::function< void(std::shared_ptr< StdMatrix< uint32_t > > classes, size_t begin, size_t end, size_t slot_idx) > | tagging_callback_t |
Public Member Functions | |
| GraphDpImpl () | |
| std::shared_ptr< EmbdUInt64Float > | convert (const EmbdStrFloat &src) |
| virtual void | load (const std::string &fn, const PathResolver &path_resolver) |
| void | init (size_t threads, size_t num_buffers, size_t buffer_size_per_thread, StringIndex &stridx, const std::vector< std::string > &class_names) |
| void | precompute_inputs (const typename Vectorizer::dataset_t &buffer) |
| virtual void | register_handler (const tagging_callback_t fn) |
| virtual | ~GraphDpImpl () |
| void | send_next_results () |
| void | send_all_results () |
| virtual void | handle_token_buffer (size_t slot_no, size_t first_timepoint_idx, const typename Vectorizer::dataset_t &buffer, const std::vector< size_t > &lengths, int timepoints_to_analyze=-1) |
| void | no_more_data (size_t slot_no) |
| Public Member Functions inherited from deeplima::RnnSequenceClassifier< Model, BaseMatrix, uint32_t > | |
| RnnSequenceClassifier () | |
| virtual | ~RnnSequenceClassifier () |
| int32_t | next_slot (uint32_t idx) |
| std::shared_ptr< StdMatrix< uint32_t > > | get_output () |
| virtual void | reset () |
| Need to be called to be able to reuse this classifier on several sequences. | |
| virtual void | init (uint32_t max_feat, uint32_t overlap, uint32_t num_slots, uint32_t slot_len, uint32_t num_threads, bool precomputed_input=false) |
| void | load (const std::string &fn) |
| void | get_classes_from_fn (const std::string &fn, std::vector< std::string > &classes_names, std::vector< std::vector< std::string > > &classes) |
| uint8_t | get_output (uint64_t pos, uint8_t cls) |
| uint64_t | get_slot_begin (uint32_t idx) const |
| uint64_t | get_slot_base (uint32_t idx) const |
| bool | get_slot_started (uint32_t idx) const |
| uint64_t | get_slot_end (uint32_t idx) const |
| uint8_t | get_lock_count (uint32_t idx) const |
| void | increment_lock_count (uint32_t idx, uint8_t v=1) |
| void | decrement_lock_count (uint32_t idx) |
| uint64_t | get_start_timepoint () const |
| void | increment_timepoint (uint64_t &timepoint) |
| uint32_t | get_num_slots () const |
| uint32_t | get_slot_size () const |
| int32_t | get_slot_idx (uint64_t timepoint) const |
| void | set_slot_lengths (uint32_t idx, const std::vector< size_t > &lengths) |
| void | set_slot_begin (uint32_t idx, uint64_t slot_begin) |
| void | set_slot_end (uint32_t idx, uint64_t slot_end) |
| void | start_job (uint32_t idx, bool no_more_data=false) |
| void | wait_for_slot (uint32_t idx) |
| void | pretty_print () const |
| Public Member Functions inherited from deeplima::ThreadPool< P > | |
| ThreadPool (size_t num_threads=0) | |
| void | init (size_t num_threads) |
| size_t | get_num_threads () const |
| virtual | ~ThreadPool () |
| void | stop () |
| size_t | running () |
| void | push (void *job) |
Protected Member Functions | |
| void | increment_timepoint (uint64_t &timepoint) |
| void | send_results (int32_t slot_idx) |
| void | send_results_if_available () |
| void | acquire_slot (size_t slot_no) |
| Protected Member Functions inherited from deeplima::RnnSequenceClassifier< Model, BaseMatrix, uint32_t > | |
| int32_t | prev_slot (uint32_t idx) |
| void | clear_slot (uint32_t idx) |
| void | start_job_impl (uint32_t idx) |
| Push the slot idx in the thread pool for starting the job on it. | |
| Protected Member Functions inherited from deeplima::ThreadPool< P > | |
| bool | wait_for_new_job (void **job) |
| This will wait until a job is available and then job parameter will be set to this available which will be removed from the list. | |
| void | wait_for_any_job_notification (const std::function< bool()> fn) |
| void | thread_fn (size_t worker_id) |
Protected Attributes | |
| Vectorizer | m_vectorizer |
| std::shared_ptr< FastTextVectorizer< eigen_wrp::EigenMatrixXf::matrix_t, Eigen::Index > > | m_fastText |
| std::vector< std::shared_ptr< FeatureVectorizerBase< Eigen::Index > > > | m_featVectorizers |
| tagging_callback_t | m_callback |
| uint64_t | m_current_timepoint |
| uint32_t | m_current_slot_timepoints |
| int32_t | m_current_slot_no |
| int32_t | m_last_completed_slot |
| size_t | m_curr_buff_idx |
| Protected Attributes inherited from deeplima::RnnSequenceClassifier< Model, BaseMatrix, uint32_t > | |
| friend | RnnSequenceClassifierThreadPool |
| uint32_t | m_overlap |
| uint32_t | m_num_slots |
| uint32_t | m_slot_len |
| std::vector< slot_t > | m_slots |
| std::vector< std::vector< size_t > > | m_lengths |
| std::shared_ptr< StdMatrix< uint32_t > > | m_output |
| Protected Attributes inherited from deeplima::ThreadPool< P > | |
| std::vector< std::thread > | m_workers |
| std::atomic< bool > | m_stop |
| std::queue< void * > | m_jobs |
| std::mutex | m_mutex |
| std::condition_variable | m_cv |
| std::mutex | m_mutex_notify |
| std::condition_variable | m_cv_notify |
Additional Inherited Members | |
| Protected Types inherited from deeplima::RnnSequenceClassifier< Model, BaseMatrix, uint32_t > | |
| typedef RnnSequenceClassifier< Model, BaseMatrix, uint32_t > | ThisClass |
| typedef ThreadPool< ThisClass > | RnnSequenceClassifierThreadPool |
| enum | slot_flags_t |
| Static Protected Member Functions inherited from deeplima::RnnSequenceClassifier< Model, BaseMatrix, uint32_t > | |
| static void | run_one_job (ThisClass *this_ptr, size_t worker_id, void *p) |
Definition at line 688 of file dependency_parser.h.
| typedef std::function< void (std::shared_ptr< StdMatrix<uint32_t> > classes, size_t begin, size_t end, size_t slot_idx) > deeplima::DependencyParser::GraphDpImpl::tagging_callback_t |
Definition at line 813 of file dependency_parser.h.
|
inline |
Definition at line 692 of file dependency_parser.h.
|
inlinevirtual |
Definition at line 820 of file dependency_parser.h.
|
inlineprotected |
Definition at line 943 of file dependency_parser.h.
|
inline |
Definition at line 711 of file dependency_parser.h.
|
inlinevirtual |
Definition at line 975 of file dependency_parser.h.
|
inlineprotected |
Definition at line 827 of file dependency_parser.h.
|
inline |
Definition at line 735 of file dependency_parser.h.
|
inlinevirtual |
Definition at line 721 of file dependency_parser.h.
|
inline |
Definition at line 1025 of file dependency_parser.h.
|
inline |
Definition at line 807 of file dependency_parser.h.
|
inlinevirtual |
Definition at line 815 of file dependency_parser.h.
|
inline |
Definition at line 883 of file dependency_parser.h.
|
inline |
Definition at line 850 of file dependency_parser.h.
|
inlineprotected |
Definition at line 834 of file dependency_parser.h.
|
inlineprotected |
Definition at line 922 of file dependency_parser.h.
|
protected |
Definition at line 1042 of file dependency_parser.h.
|
protected |
Definition at line 1050 of file dependency_parser.h.
|
protected |
Definition at line 1047 of file dependency_parser.h.
|
protected |
Definition at line 1045 of file dependency_parser.h.
|
protected |
Definition at line 1044 of file dependency_parser.h.
|
protected |
Definition at line 1039 of file dependency_parser.h.
|
protected |
Definition at line 1040 of file dependency_parser.h.
|
protected |
Definition at line 1048 of file dependency_parser.h.
|
protected |
Definition at line 1038 of file dependency_parser.h.