matchzoo.preprocessors.units.stateful_unit
¶
Module Contents¶
-
class
matchzoo.preprocessors.units.stateful_unit.
StatefulUnit
¶ Bases:
matchzoo.preprocessors.units.unit.Unit
Unit with inner state.
Usually need to be fit before transforming. All information gathered in the fit phrase will be stored into its context.
-
state
¶ Get current context. Same as unit.context.
Deprecated since v2.2.0, and will be removed in the future. Used unit.context instead.
-
context
¶ Get current context. Same as unit.state.
-
fit
(self, input_: typing.Any)¶ Abstract base method, need to be implemented in subclass.
-