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

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

Public Types

enum  ngram_type_t : uint8_t {
  char_ngram = 0x00 , type_ngram = 0x01 , len_ngram = 0x02 , script_ngram = 0x03 ,
  lexicon_ngram = 0x04 , max_ngram_type
}

Public Member Functions

 ngram_descr_t (int8_t offset=0, uint8_t length=0, ngram_type_t type=char_ngram)
 ngram_descr_t (const std::string &serialized_form)
bool operator== (const ngram_descr_t &other)
std::string to_string () const
void from_string (const std::string &str)

Public Attributes

int8_t m_offset
uint8_t m_length
ngram_type_t m_type

Friends

bool operator< (const ngram_descr_t &l, const ngram_descr_t &r)

Detailed Description

Definition at line 16 of file char_ngram.h.

Member Enumeration Documentation

◆ ngram_type_t

Enumerator
char_ngram 
type_ngram 
len_ngram 
script_ngram 
lexicon_ngram 
max_ngram_type 

Definition at line 18 of file char_ngram.h.

Constructor & Destructor Documentation

◆ ngram_descr_t() [1/2]

deeplima::segmentation::impl::ngram_descr_t::ngram_descr_t ( int8_t offset = 0,
uint8_t length = 0,
ngram_type_t type = char_ngram )
inline

Definition at line 32 of file char_ngram.h.

◆ ngram_descr_t() [2/2]

deeplima::segmentation::impl::ngram_descr_t::ngram_descr_t ( const std::string & serialized_form)
inlineexplicit

Definition at line 35 of file char_ngram.h.

Member Function Documentation

◆ from_string()

void deeplima::segmentation::impl::ngram_descr_t::from_string ( const std::string & str)
inline

Definition at line 58 of file char_ngram.h.

◆ operator==()

bool deeplima::segmentation::impl::ngram_descr_t::operator== ( const ngram_descr_t & other)
inline

Definition at line 46 of file char_ngram.h.

◆ to_string()

std::string deeplima::segmentation::impl::ngram_descr_t::to_string ( ) const
inline

Definition at line 51 of file char_ngram.h.

◆ operator<

bool operator< ( const ngram_descr_t & l,
const ngram_descr_t & r )
friend

Definition at line 41 of file char_ngram.h.

Member Data Documentation

◆ m_length

uint8_t deeplima::segmentation::impl::ngram_descr_t::m_length

Definition at line 29 of file char_ngram.h.

◆ m_offset

int8_t deeplima::segmentation::impl::ngram_descr_t::m_offset

Definition at line 28 of file char_ngram.h.

◆ m_type

ngram_type_t deeplima::segmentation::impl::ngram_descr_t::m_type

Definition at line 30 of file char_ngram.h.


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