rxn.onmt_models.prediction_collapser.BaseCollapser

class rxn.onmt_models.prediction_collapser.BaseCollapser(collapsing_fns)[source]

Bases: object

Helper class for collapsing things.

Having this base collapser can be useful for extending things in the future, if we want to make this class more general than just working with tuples.

Parameters

collapsing_fns (Iterable[Callable[[str], str]]) –

__init__(collapsing_fns)[source]
Parameters

collapsing_fns (Iterable[Callable[[str], str]]) –

Methods

__init__(collapsing_fns)

param collapsing_fns

collapse(predictions)

param predictions