Closed sullivan-sean closed 1 year ago
@tarioch and @yagebu, what do you think? (you've been involved in the past pipeline refactorings)
my opinion: thumbs up, custom getters sound reasonable, why not. Pull Request welcome, thx!
long time no hear... shall we close this issue?
This is somewhat of a follow up on https://github.com/beancount/smart_importer/issues/45
To avoid proliferation of metadata fields, I would like to keep my training metadata to a single row, so instead of having
original_narration
,original_payee
andcategory
, I would like to have something like:And then would like to define a pipeline attribute getter that parses this combined meta field, for example:
I don't think this results in much code duplication and the only internal change that would be necessary is to add the
pipeline_getters
attribute toEntryPredictor
and changedefine_pipeline
method ofEntryPredictor
, i.e. this line:Becomes:
This tremendously increases the flexibility of feature extraction (as you can define custom logic based on multiple fields) and the only real internal change is to introduce this
pipeline_getters
attribute.