0a37dea8cd7bc8d533ee971cb6fc5ec59537f4b7,pliers/extractors/text.py,PartOfSpeechExtractor,_extract,#PartOfSpeechExtractor#Any#,182
Before Change
data = {}
onsets = []
durations = []
for i, w in enumerate(stim):
p = pos[i][1]
if p not in data:
data[p] = [0] * len(words)
data[p][i] += 1
onsets.append(w.onset)
durations.append(w.duration)
return ExtractorResult(np.array(list(data.values())).transpose(),
stim, self, features=list(data.keys()),
onsets=onsets, durations=durations)
After Change
"returned by nltk"s part-of-speech tagger.")
results = []
tagset = nltk.data.load("help/tagsets/upenn_tagset.pickle").keys()
for i, s in enumerate(stims):
pos_vector = [0] * len(tagset)
pos_vector[tagset.index(pos[i][1])] = 1
results.append(ExtractorResult([pos_vector], s, self,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: tyarkoni/pliers
Commit Name: 0a37dea8cd7bc8d533ee971cb6fc5ec59537f4b7
Time: 2017-10-22
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/text.py
Class Name: PartOfSpeechExtractor
Method Name: _extract
Project Name: OpenNMT/OpenNMT-py
Commit Name: 857e36921ab5ca51c919839ec0b6e87585160d0c
Time: 2019-02-14
Author: dylan.flaute@gmail.com
File Name: onmt/decoders/ensemble.py
Class Name:
Method Name: load_test_model
Project Name: dPys/PyNets
Commit Name: d64b3e882f106f19ea02a5a6066e60a9c0616c5b
Time: 2019-08-24
Author: dpisner@utexas.edu
File Name: pynets/core/utils.py
Class Name:
Method Name: make_gtab_and_bmask