pub enum LabelAggregationOption {
First,
Last,
Mode,
Custom(Box<fn(_: &[Token]) -> (i64, String)>),
}Expand description
Enum defining the label aggregation method for sub tokens
Defines the behaviour for labels aggregation if the consolidation of sub-tokens is enabled.
Variants§
First
The label of the first sub token is assigned to the entire token
Last
The label of the last sub token is assigned to the entire token
Mode
The most frequent sub- token is assigned to the entire token
Custom(Box<fn(_: &[Token]) -> (i64, String)>)
The user can provide a function mapping a &Vec<Token> to a (i64, String) tuple corresponding to the label index, label String to return