Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Multiple Analyzers at Once in get_data() #336

Open
crantila opened this issue Nov 24, 2014 · 0 comments
Open

Allow Multiple Analyzers at Once in get_data() #336

crantila opened this issue Nov 24, 2014 · 0 comments

Comments

@crantila
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants