It used to be possible to match arbitrary objects (e.g. classes) with extractWithoutOrder() (extract(), extractBest(),..) by providing a custom scorer and processor.
But this check limits matching to only strings (or implementing __len__())
My workaround is having the processor wrap an element in a list and strip that away again in the scorer.
Since the docstring does not specify it being limited to strings (only for the default scorer), I think this might be a bug or at least an error in the docu.
Or is there a better approach to my scenario?
It used to be possible to match arbitrary objects (e.g. classes) with
extractWithoutOrder()
(extract()
,extractBest()
,..) by providing a custom scorer and processor. But this check limits matching to only strings (or implementing__len__()
)My workaround is having the processor wrap an element in a list and strip that away again in the scorer.
Since the docstring does not specify it being limited to strings (only for the default scorer), I think this might be a bug or at least an error in the docu. Or is there a better approach to my scenario?