bnl.core.BoundaryContour
- class bnl.core.BoundaryContour(bs, *, name=None)[source]
Bases:
TimeSpanAn intermediate, purely structural representation of boundary salience over time.
Public Data Attributes:
bsstartendPublic Methods:
plot(**kwargs)Plots the BoundaryContour on a Plotly figure.
clean([strategy])Cleans up the boundary contour using a specified strategy.
level([strategy])Converts the BoundaryContour to a BoundaryHierarchy by quantizing salience.
- Parameters:
bs (Sequence[RatedBoundary])
name (str | None)
- plot(**kwargs)[source]
Plots the BoundaryContour on a Plotly figure.
- Parameters:
fig – Optional Plotly Figure to add to.
**kwargs (Any) – Additional keyword arguments to pass to the plotting function.
- Returns:
A Plotly Figure object with the boundary contour visualization.
- Return type:
Figure
- clean(strategy='absorb', **kwargs)[source]
Cleans up the boundary contour using a specified strategy.
This is a convenience wrapper around bnl.ops.clean_boundaries.
- Parameters:
strategy (str) – The cleaning strategy to use. See bnl.ops.clean_boundaries for details. Defaults to ‘absorb’.
**kwargs – Additional keyword arguments to pass to the strategy (e.g., window).
- Returns:
A new, cleaned BoundaryContour.
- Return type: