Vowpal Wabbit
Public Member Functions | Public Attributes | List of all members
parser Struct Reference

#include <parser.h>

Public Member Functions

 parser (size_t example_queue_limit, bool strict_parse_)
 
 parser (const parser &)=delete
 
parseroperator= (const parser &)=delete
 

Public Attributes

std::vector< VW::string_viewwords
 
VW::object_pool< exampleexample_pool
 
VW::ptr_queue< exampleready_parsed_examples
 
io_buf input
 
int(* reader )(VW::workspace *, io_buf &, v_array< example *> &examples)
 
void(* text_reader )(VW::workspace *, const char *, size_t, v_array< example *> &)
 text_reader consumes the char* input and is for text based parsing More...
 
shared_data_shared_data = nullptr
 
hash_func_t hasher
 
bool resettable
 
io_buf output
 
VW::details::cache_temp_buffer _cache_temp_buffer
 
std::string currentname
 
std::string finalname
 
bool write_cache = false
 
bool sort_features = false
 
bool sorted_cache = false
 
size_t example_queue_limit
 
std::atomic< uint64_t > num_examples_taken_from_pool
 
std::atomic< uint64_t > num_setup_examples
 
std::atomic< uint64_t > num_finished_examples
 
uint32_t in_pass_counter = 0
 
bool emptylines_separate_examples = false
 
std::mutex output_lock
 
std::condition_variable output_done
 
bool done = false
 
int bound_sock = 0
 
VW::label_parser_reuse_mem parser_memory_to_reuse
 
label_parser lbl_parser
 
bool audit = false
 
bool decision_service_json = false
 
bool strict_parse
 
std::exception_ptr exc_ptr
 
std::unique_ptr< dsjson_metricsmetrics = nullptr
 

Constructor & Destructor Documentation

◆ parser() [1/2]

parser::parser ( size_t  example_queue_limit,
bool  strict_parse_ 
)
inline

◆ parser() [2/2]

parser::parser ( const parser )
delete

Member Function Documentation

◆ operator=()

parser& parser::operator= ( const parser )
delete

Member Data Documentation

◆ _cache_temp_buffer

VW::details::cache_temp_buffer parser::_cache_temp_buffer

◆ _shared_data

shared_data* parser::_shared_data = nullptr

◆ audit

bool parser::audit = false

◆ bound_sock

int parser::bound_sock = 0

◆ currentname

std::string parser::currentname

◆ decision_service_json

bool parser::decision_service_json = false

◆ done

bool parser::done = false

◆ emptylines_separate_examples

bool parser::emptylines_separate_examples = false

◆ example_pool

VW::object_pool<example> parser::example_pool

◆ example_queue_limit

size_t parser::example_queue_limit

◆ exc_ptr

std::exception_ptr parser::exc_ptr

◆ finalname

std::string parser::finalname

◆ hasher

hash_func_t parser::hasher

◆ in_pass_counter

uint32_t parser::in_pass_counter = 0

◆ input

io_buf parser::input

◆ lbl_parser

label_parser parser::lbl_parser

◆ metrics

std::unique_ptr<dsjson_metrics> parser::metrics = nullptr

◆ num_examples_taken_from_pool

std::atomic<uint64_t> parser::num_examples_taken_from_pool

◆ num_finished_examples

std::atomic<uint64_t> parser::num_finished_examples

◆ num_setup_examples

std::atomic<uint64_t> parser::num_setup_examples

◆ output

io_buf parser::output

◆ output_done

std::condition_variable parser::output_done

◆ output_lock

std::mutex parser::output_lock

◆ parser_memory_to_reuse

VW::label_parser_reuse_mem parser::parser_memory_to_reuse

◆ reader

int(* parser::reader) (VW::workspace *, io_buf &, v_array< example * > &examples)

reader consumes the given io_buf and produces parsed examples. The number of produced examples is implementation defined. However, in practice for single_line parsers a single example is produced. And for multi_line parsers multiple are produced which all correspond the the same overall logical example. examples must have a single empty example in it when this call is made.

◆ ready_parsed_examples

VW::ptr_queue<example> parser::ready_parsed_examples

◆ resettable

bool parser::resettable

◆ sort_features

bool parser::sort_features = false

◆ sorted_cache

bool parser::sorted_cache = false

◆ strict_parse

bool parser::strict_parse

◆ text_reader

void(* parser::text_reader) (VW::workspace *, const char *, size_t, v_array< example * > &)

text_reader consumes the char* input and is for text based parsing

◆ words

std::vector<VW::string_view> parser::words

◆ write_cache

bool parser::write_cache = false

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