bnl.data.Track
- class bnl.data.Track(track_id, manifest_row, dataset)[source]
Bases:
objectA single track and its associated data assets.
Public Data Attributes:
track_idmanifest_rowdatasetPublic Methods:
Essential track information (cached).
Returns available reference annotations.
Returns available estimated annotations.
Returns the reference JAMS object for this track.
load_annotation(annotation_type[, annotator])Loads a specific annotation as a MultiSegment.
- Parameters:
track_id (str)
manifest_row (Series)
dataset (Dataset)
- property info: dict[str, Any]
Essential track information (cached).
- property refs: dict[str, MultiSegment]
Returns available reference annotations.
- property ests: dict[str, MultiSegment]
Returns available estimated annotations.
- property jam: JAMS | None
Returns the reference JAMS object for this track.
- load_annotation(annotation_type, annotator=None)[source]
Loads a specific annotation as a MultiSegment.
- Parameters:
annotation_type (str) –
One of: - ‘reference’ to load the reference JAMS. Optionally pass
annotator to select a specific annotator by name.
’adobe-<id>’ to load an Adobe JSON (e.g., ‘adobe-mu1gamma1’).
annotator (str | None) – Name of the annotator in the JAMS file to select.
- Raises:
ValueError – If the requested annotation is unavailable for this track.
NotImplementedError – If the file type is unsupported (.jams and .json are supported).
- Return type: