Your error is in analyzer = super(StemmedCountVectorizer, self.build_analyzer()) here you are calling the function build_analyzer before the super call, which cause a infinite recursive loop. Change it for analyzer = super(StemmedCountVectorizer, self).build_analyzer()