LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
deeplima::segmentation::impl::SegmentationDecoder Class Reference

#include <deeplima/segmentation/impl/segmentation_decoder.h>

Inheritance diagram for deeplima::segmentation::impl::SegmentationDecoder:
deeplima::segmentation::impl::CharReader< M >

Public Member Functions

 SegmentationDecoder (std::shared_ptr< StdMatrix< uint8_t > > out, const std::vector< uint8_t > &len)
 
void init ()
 
void register_handler (const segmentation_callback_t fn)
 
void save_current_token (size_t &pos, size_t &temp_token_len, const char *start)
 
void consome_character (size_t &pos, uint64_t from, const char *pch)
 
uint64_t decode (const char **pch, uint32_t max, uint64_t from, uint64_t to)
 
- Public Member Functions inherited from deeplima::segmentation::impl::CharReader< M >
 CharReader ()
 
bool read (const char **pch, const char *end, uint8_t len)
 
bool not_empty () const
 
bool start_reading (const char **pch, const char *end, uint8_t len, std::vector< uint8_t > &dst, token_pos &tmp, bool inside)
 

Protected Attributes

std::shared_ptr< StdMatrix< uint8_t > > m_out
 
const std::vector< uint8_t > & m_len
 
std::vector< token_pos > m_tokens
 
segmentation_callback_t m_callback
 
std::vector< uint8_t > m_temp_text
 
- Protected Attributes inherited from deeplima::segmentation::impl::CharReader< M >
char m_buff [M]
 
uint8_t m_buff_len
 

Detailed Description

Definition at line 182 of file segmentation_decoder.h.

Constructor & Destructor Documentation

◆ SegmentationDecoder()

deeplima::segmentation::impl::SegmentationDecoder::SegmentationDecoder ( std::shared_ptr< StdMatrix< uint8_t > >  out,
const std::vector< uint8_t > &  len 
)
inline

Definition at line 186 of file segmentation_decoder.h.

Member Function Documentation

◆ consome_character()

void deeplima::segmentation::impl::SegmentationDecoder::consome_character ( size_t &  pos,
uint64_t  from,
const char *  pch 
)
inline

Definition at line 226 of file segmentation_decoder.h.

◆ decode()

uint64_t deeplima::segmentation::impl::SegmentationDecoder::decode ( const char **  pch,
uint32_t  max,
uint64_t  from,
uint64_t  to 
)
inline

Definition at line 236 of file segmentation_decoder.h.

◆ init()

void deeplima::segmentation::impl::SegmentationDecoder::init ( )
inline

Definition at line 193 of file segmentation_decoder.h.

◆ register_handler()

void deeplima::segmentation::impl::SegmentationDecoder::register_handler ( const segmentation_callback_t  fn)
inline

Definition at line 198 of file segmentation_decoder.h.

◆ save_current_token()

void deeplima::segmentation::impl::SegmentationDecoder::save_current_token ( size_t &  pos,
size_t &  temp_token_len,
const char *  start 
)
inline

Definition at line 203 of file segmentation_decoder.h.

Member Data Documentation

◆ m_callback

segmentation_callback_t deeplima::segmentation::impl::SegmentationDecoder::m_callback
protected

Definition at line 530 of file segmentation_decoder.h.

◆ m_len

const std::vector<uint8_t>& deeplima::segmentation::impl::SegmentationDecoder::m_len
protected

Definition at line 524 of file segmentation_decoder.h.

◆ m_out

std::shared_ptr< StdMatrix<uint8_t> > deeplima::segmentation::impl::SegmentationDecoder::m_out
protected

Definition at line 523 of file segmentation_decoder.h.

◆ m_temp_text

std::vector<uint8_t> deeplima::segmentation::impl::SegmentationDecoder::m_temp_text
protected

Definition at line 533 of file segmentation_decoder.h.

◆ m_tokens

std::vector<token_pos> deeplima::segmentation::impl::SegmentationDecoder::m_tokens
protected

Definition at line 527 of file segmentation_decoder.h.


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