Skip to content

Allow Multiple Analyzers at Once in get_data() #336

Open

Description

@crantila

Currently, if an analyzer requires input from more than one previous analyzer, the workflow requires multiple calls to get_data(). For example, interval n-grams go like this:

v_ints = indp.get_data([NoteRestIndexer, IntervalIndexer])
h_ints = indp.get_data([NoteRestIndexer, HorizontalIntervalIndexer])
ints = pandas.concat(v_ints, h_ints)
ngrams = indp.get_data([NGramIndexer], settings, ints)

Considering how common this type of workflow is, this is really more complicated than it should be. Worse, it really isn't obvious why this is the case. IndexedPiece objects should be able to do this multiplexing by themselves, as in this example:

ngrams = indp.get_data([NoteRestIndexer, [IntervalIndexer, HorizontalIntervalIndexer], NGramIndexer)

Wow. It's so much simpler! Please develop this on a feature branch, since I'm hoping to keep master stable in preparation for the formal release of VIS 2.0.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions