![]() |
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, InputVectorizer, Out > | |
| RnnSequenceClassifier () | |
| virtual | ~RnnSequenceClassifier () |
| int32_t | next_slot (uint32_t idx) |
| std::shared_ptr< StdMatrix< Out > > | 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 |
| 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< RnnSequenceClassifier< Model, InputVectorizer, Out > > | |
| 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, InputVectorizer, Out > | |
| 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< RnnSequenceClassifier< Model, InputVectorizer, Out > > | |
| 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) |
Additional Inherited Members | |
Protected Types inherited from deeplima::RnnSequenceClassifier< Model, InputVectorizer, Out > | |
| enum | slot_flags_t : uint8_t { none = 0x00 , left_overlap = 0x01 , right_overlap = 0x02 , max_flags } |
| typedef RnnSequenceClassifier< Model, InputVectorizer, Out > | ThisClass |
| typedef ThreadPool< ThisClass > | RnnSequenceClassifierThreadPool |
Static Protected Member Functions inherited from deeplima::RnnSequenceClassifier< Model, InputVectorizer, Out > | |
| static void | run_one_job (ThisClass *this_ptr, size_t worker_id, void *p) |
Definition at line 633 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 758 of file dependency_parser.h.
|
inline |
Definition at line 637 of file dependency_parser.h.
|
inlinevirtual |
Definition at line 765 of file dependency_parser.h.
|
inlineprotected |
Definition at line 888 of file dependency_parser.h.
|
inline |
Definition at line 656 of file dependency_parser.h.
|
inlinevirtual |
Definition at line 920 of file dependency_parser.h.
|
inlineprotected |
Definition at line 772 of file dependency_parser.h.
|
inline |
Definition at line 680 of file dependency_parser.h.
|
inlinevirtual |
Definition at line 666 of file dependency_parser.h.
|
inline |
Definition at line 979 of file dependency_parser.h.
|
inline |
Definition at line 752 of file dependency_parser.h.
|
inlinevirtual |
Definition at line 760 of file dependency_parser.h.
|
inline |
Definition at line 828 of file dependency_parser.h.
|
inline |
Definition at line 795 of file dependency_parser.h.
|
inlineprotected |
Definition at line 779 of file dependency_parser.h.
|
inlineprotected |
Definition at line 867 of file dependency_parser.h.
|
protected |
Definition at line 996 of file dependency_parser.h.
|
protected |
Definition at line 1004 of file dependency_parser.h.
|
protected |
Definition at line 1001 of file dependency_parser.h.
|
protected |
Definition at line 999 of file dependency_parser.h.
|
protected |
Definition at line 998 of file dependency_parser.h.
|
protected |
Definition at line 993 of file dependency_parser.h.
|
protected |
Definition at line 994 of file dependency_parser.h.
|
protected |
Definition at line 1002 of file dependency_parser.h.
|
protected |
Definition at line 992 of file dependency_parser.h.