0cdbd836f44e9351e769b2504d82680af838927f,pliers/extractors/text.py,WordCounterExtractor,_extract,#WordCounterExtractor#Any#,419
Before Change
word_counter = pd.Series(tokens).value_counts()
return ExtractorResult(list(word_counter), stim,
self, features=list(word_counter.index)) //still in progress
After Change
tokens = {k: pos_map[v] if v in pos_map else "n" for k, v in tokens.items()}
tokens = [lemmatizer.lemmatize(k, pos=v) for k, v in tokens.items()]
word_counter = pd.Series(tokens).groupby(tokens).cumcount()
results = []
for i, count in enumerate(word_counter):
results.append(ExtractorResult([count], stims[i], self,
features=["word_counter"]))
return results
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tyarkoni/pliers
Commit Name: 0cdbd836f44e9351e769b2504d82680af838927f
Time: 2020-01-19
Author: rbrrcc@gmail.com
File Name: pliers/extractors/text.py
Class Name: WordCounterExtractor
Method Name: _extract
Project Name: bokeh/bokeh
Commit Name: 4ace574968a1001c80b1689239d767f9e4497d78
Time: 2015-08-14
Author: nroth@dealnews.com
File Name: bokeh/charts/builder/scatter_builder.py
Class Name: ScatterBuilder
Method Name: _yield_renderers
Project Name: bokeh/bokeh
Commit Name: 6d60be3b73b0ef4e1353747eb8be4a9d904d34ba
Time: 2015-08-23
Author: nroth@dealnews.com
File Name: bokeh/charts/builder/bar_builder.py
Class Name: BarBuilder
Method Name: _yield_renderers