Vowpal Wabbit
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
VW::parser Class 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< VW::exampleexample_pool
 
VW::thread_safe_queue< VW::example * > ready_parsed_examples
 
io_buf input
 
int(* reader )(VW::workspace *, io_buf &, VW::multi_ex &examples)
 
void(* text_reader )(VW::workspace *, VW::string_view, VW::multi_ex &)
 text_reader consumes the char* input and is for text based parsing More...
 
hash_func_t hasher
 
bool resettable
 
io_buf output
 
VW::parsers::cache::details::cache_temp_buffer cache_temp_buffer_obj
 
std::string currentname
 
std::string finalname
 
bool write_cache = false
 
bool sort_features = 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
 
VW::label_parser lbl_parser
 
bool audit = false
 
bool decision_service_json = false
 
bool strict_parse
 
std::exception_ptr exc_ptr
 
std::unique_ptr< details::dsjson_metricsmetrics = nullptr
 

Constructor & Destructor Documentation

◆ parser() [1/2]

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

◆ parser() [2/2]

VW::parser::parser ( const parser )
delete

Member Function Documentation

◆ operator=()

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

Member Data Documentation

◆ audit

bool VW::parser::audit = false

◆ bound_sock

int VW::parser::bound_sock = 0

◆ cache_temp_buffer_obj

VW::parsers::cache::details::cache_temp_buffer VW::parser::cache_temp_buffer_obj

◆ currentname

std::string VW::parser::currentname

◆ decision_service_json

bool VW::parser::decision_service_json = false

◆ done

bool VW::parser::done = false

◆ emptylines_separate_examples

bool VW::parser::emptylines_separate_examples = false

◆ example_pool

VW::object_pool<VW::example> VW::parser::example_pool

◆ example_queue_limit

size_t VW::parser::example_queue_limit

◆ exc_ptr

std::exception_ptr VW::parser::exc_ptr

◆ finalname

std::string VW::parser::finalname

◆ hasher

hash_func_t VW::parser::hasher

◆ in_pass_counter

uint32_t VW::parser::in_pass_counter = 0

◆ input

io_buf VW::parser::input

◆ lbl_parser

VW::label_parser VW::parser::lbl_parser

◆ metrics

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

◆ num_examples_taken_from_pool

std::atomic<uint64_t> VW::parser::num_examples_taken_from_pool

◆ num_finished_examples

std::atomic<uint64_t> VW::parser::num_finished_examples

◆ num_setup_examples

std::atomic<uint64_t> VW::parser::num_setup_examples

◆ output

io_buf VW::parser::output

◆ output_done

std::condition_variable VW::parser::output_done

◆ output_lock

std::mutex VW::parser::output_lock

◆ parser_memory_to_reuse

VW::label_parser_reuse_mem VW::parser::parser_memory_to_reuse

◆ reader

int(* VW::parser::reader) (VW::workspace *, io_buf &, VW::multi_ex &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::thread_safe_queue<VW::example*> VW::parser::ready_parsed_examples

◆ resettable

bool VW::parser::resettable

◆ sort_features

bool VW::parser::sort_features = false

◆ strict_parse

bool VW::parser::strict_parse

◆ text_reader

void(* VW::parser::text_reader) (VW::workspace *, VW::string_view, VW::multi_ex &)

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

◆ words

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

◆ write_cache

bool VW::parser::write_cache = false

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