84c6230896e6fee31ecca27fa9fe4a4306b89b60,skll/data.py,,write_feature_file,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,1094
Before Change
logger.debug("Features: %s", features)
// Check for valid features
if feat_vectorizer is None and features and not isinstance(features[0],
dict):
raise ValueError("If `feat_vectorizer` is unspecified, you must pass " +
"a list of dicts for `features`.")
// Convert features to list of dicts if given an array-like and a vectorizer
if feat_vectorizer is not None:
features = feat_vectorizer.inverse_transform(features)
// Create ID generator if necessary
After Change
logger.debug("Feature vectorizer: %s", feat_vectorizer)
logger.debug("Features: %s", features)
is_libsvm = os.path.splitext(path)[1].lower() == ".libsvm"
// Check for valid features
if isinstance(features, np.ndarray):
if feat_vectorizer is None:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: EducationalTestingService/skll
Commit Name: 84c6230896e6fee31ecca27fa9fe4a4306b89b60
Time: 2014-08-06
Author: dblanchard@ets.org
File Name: skll/data.py
Class Name:
Method Name: write_feature_file
Project Name: EducationalTestingService/skll
Commit Name: e8db6660b202733a5764e9e9add869dbde8dbc32
Time: 2014-11-06
Author: nmadnani@ets.org
File Name: skll/utilities/join_features.py
Class Name:
Method Name: main
Project Name: OpenNMT/OpenNMT-tf
Commit Name: d97a73f8ea19e52166702dd448dea03e3a6be95b
Time: 2019-03-27
Author: guillaume.klein@systrangroup.com
File Name: opennmt/models/sequence_classifier.py
Class Name: SequenceClassifier
Method Name: __init__