VoteFilter#
- class VoteFilter(config)#
Bases:
FilterThe vote
Filterassigns a single value by majority vote from a list of values (e.g.[["positive"],["negative"],["positive"]] -> ["positive"],["positive", "negative", "negative"] -> ["negative"]). It picks the first element of the list, in case of a tie.Input - all input fields need to be of type
list[str] orlist[list[str]].Output - all output fields are filled with data of type
list[str] (thelistcontains only a single element).- Parameters:
Example
{ "step": "filter", "type": "vote", "fields": ["prediction"] }
Methods Summary
process_doc(doc)Process a document
Methods Documentation