我为FeatureUnion编写此代码以组合两个列表:
all_features = FeatureUnion([twenty_train_data, twenty_train_pos])
twenty_train_data "contains words"
twenty_train_pos "contains pos tags"
但我收到了这个错误:
all_features = FeatureUnion([twenty_train_data,twenty_train_pos]) 文件“/usr/local/lib/python2.7/dist-packages/sklearn/pipeline.py”,行 618,在 init 中 self._validate_transformers() 文件“/usr/local/lib/python2.7/dist-packages/sklearn/pipeline.py”,行 649,在_validate_transformers中 名字,变形金刚= zip(* self.transformer_list) ValueError:要解压缩的值太多