ParangonadaLoader

loader.alignment.parangonada.ParangonadaLoader()

Load a parangonada CSV export as one multimodal AlignmentBundle.

The loader discovers every performance under the dataset’s match/match_transkun/ directory, parses the shared score part.csv once, each performance’s ppart.csv and align.csv, and binds each recording’s .wav for its sample rate. It then assembles a single bundle with one shared score group and one group per performance, linked by cross-group :class:MatchClaim instances.

Usage follows the standard loader two-phase pattern:

  1. loader.load(dataset_dir) — ingest the whole dataset directory.
  2. loader.create_bundle() — assemble the AlignmentBundle.
  3. loader.create_timeline(uid) / create_timelines() — retrieve individual timelines.

The loader reads existing alignments; it never runs an aligner.

Attributes

Name Description
performer_keys The discovered performer keys, in sorted (chronological) order.

Methods

Name Description
create_bundle Assemble the AlignmentBundle from the loaded dataset.
create_timeline Return a single timeline by its uid.
create_timelines Return all timelines: the two score timelines then each performer’s.
load Ingest a whole parangonada dataset directory.

create_bundle

loader.alignment.parangonada.ParangonadaLoader.create_bundle()

Assemble the AlignmentBundle from the loaded dataset.

Returns

Name Type Description
'AlignmentBundle' An AlignmentBundle with one shared "score" group (two
'AlignmentBundle' logical timelines), one perf:<key> group per performance
'AlignmentBundle' (two physical timelines), and all cross-group MatchClaims.

Raises

Name Type Description
RuntimeError If load() has not been called yet.

create_timeline

loader.alignment.parangonada.ParangonadaLoader.create_timeline(
    uid=None,
    **kwargs,
)

Return a single timeline by its uid.

Parameters

Name Type Description Default
uid str | None A timeline uid — "score:clt1", "score:dlt1", or a performer timeline uid ("perf:<key>:cpt1" / "perf:<key>:dpt1"). None

Raises

Name Type Description
KeyError If no timeline matches.
RuntimeError If load() has not been called yet.

create_timelines

loader.alignment.parangonada.ParangonadaLoader.create_timelines(id_pattern=None)

Return all timelines: the two score timelines then each performer’s.

Parameters

Name Type Description Default
id_pattern str | None Optional regex pattern to filter timeline IDs. None

load

loader.alignment.parangonada.ParangonadaLoader.load(dataset_dir)

Ingest a whole parangonada dataset directory.

Parameters

Name Type Description Default
dataset_dir str | Path Path to the dataset directory (the one that contains the match/ and audio/ subdirectories). required

Returns

Name Type Description
Self Self, for method chaining.

Raises

Name Type Description
FileNotFoundError If the directory or a required subdirectory is missing.