Base
base
Abstract base for compaction strategies.
SmeltStrategy
Bases: ABC
Base class for all compaction strategies.
Source code in packages/axm-smelt/src/axm_smelt/strategies/base.py
apply(ctx)
abstractmethod
Apply the compaction strategy to the given context.
Receives a SmeltContext carrying the current text (and optional
parsed representation) and returns a new SmeltContext with the
compacted result. If the strategy does not apply, return ctx
unchanged.