8a9344ead3be54cf1d427b30888e0e84ffe4d20a,hypertools/tools/text2mat.py,,text2mat,#,11
Before Change
ttype = check_type(text)
// vector models
vectorizer_models = {
"CountVectorizer" : CountVectorizer,
"TfidfVectorizer" : TfidfVectorizer
}
// text models
texts = {
"LatentDirichletAllocation" : LatentDirichletAllocation,
After Change
dtypes = list(map(check_dtype, data))
// if all data are vectorizer objects and have the same vocab, skip vectorizing
if all([dtype is "vecobj" for dtype in dtypes]):
if all_vocabs_same(data):
vectorizer=None
warnings.warn("Skipping vectorization step. Vectorizer objects "
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: ContextLab/hypertools
Commit Name: 8a9344ead3be54cf1d427b30888e0e84ffe4d20a
Time: 2018-01-22
Author: andrew.heusser@gmail.com
File Name: hypertools/tools/text2mat.py
Class Name:
Method Name: text2mat
Project Name: nilmtk/nilmtk
Commit Name: c9e4ae7a83255e5de84118e5366ecf02e32f6a5e
Time: 2014-06-30
Author: jack-list@xlk.org.uk
File Name: nilmtk/dataset_converters/redd/convert_redd.py
Class Name:
Method Name: load_chan
Project Name: nilmtk/nilmtk
Commit Name: 43800c824b97081ecbf95dfae7bff2a1d412028f
Time: 2014-01-11
Author: jack-list@xlk.org.uk
File Name: nilmtk/dataset/redd.py
Class Name:
Method Name: load_chan