fangfangli / cleartk

Automatically exported from code.google.com/p/cleartk
0 stars 0 forks source link

FeatureProliferator should be an interface #318

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
FeatureProliferator should have been an interface, like SimpleFeatureExtractor 
and BetweenAnnotationsFeatureExtractor, so that you could implement it 
alongside these. At the moment, you can't be a FeatureProliferator if you need 
to subclass anything else (because FeatureProliferator is an abstract class).

Changing it now would be backwards incompatible. I wonder if we should just 
replace it with a different interface. Seems like a FeatureProliferator is 
basically the same thing as a com.google.common.base.Function<Feature, 
List<Feature>>. Maybe we should just use that? Then people could use the guava 
Iterables.transform, Iterables.concat, etc. on FeatureProliferators.

Original issue reported on code.google.com by steven.b...@gmail.com on 30 Jul 2012 at 6:23

GoogleCodeExporter commented 9 years ago
Fixed by Philip in r3963 and r3964, using the Function approach.

Original comment by steven.b...@gmail.com on 5 Aug 2012 at 3:54