1e981ddd0d31add41361fe7db6872c6d1fa32c8b,examples/quora_similarity.py,StaticVectors,__init__,#StaticVectors#Any#Any#,95
Before Change
class StaticVectors(Embed):
def __init__(self, nlp, nO):
Model.__init__(self)
self.is_static = True
self._id_map = PreshMap()
self._id_map[0] = 0
self.nM = nlp.vocab.vectors_length
self.nO = nO
self.nV = len(nlp.vocab)
vectors = self.vectors
for i, word in enumerate(nlp.vocab):
After Change
class StaticVectors(Embed):
def __init__(self, nlp, nO):
Embed.__init__(self,
nO,
nlp.vocab.vectors_length,
len(nlp.vocab),
is_static=True)
vectors = self.vectors
for i, word in enumerate(nlp.vocab):
self._id_map[word.orth] = i+1
vectors[i+1] = word.vector / (word.vector_norm or 1.)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: explosion/thinc
Commit Name: 1e981ddd0d31add41361fe7db6872c6d1fa32c8b
Time: 2017-01-28
Author: honnibal@gmail.com
File Name: examples/quora_similarity.py
Class Name: StaticVectors
Method Name: __init__
Project Name: PyMVPA/PyMVPA
Commit Name: 8497ae6ef453f0abee0a9f4152b9ab6513f21383
Time: 2008-07-15
Author: michael.hanke@gmail.com
File Name: mvpa/misc/io/eepbin.py
Class Name: EEPBin
Method Name: __init__
Project Name: has2k1/plotnine
Commit Name: 1e5b37f18b4c8fa60d24bd212e7a351121b6dfcc
Time: 2015-09-16
Author: has2k1@gmail.com
File Name: ggplot/themes/theme_bw.py
Class Name: theme_bw
Method Name: __init__
Project Name: explosion/thinc
Commit Name: 1e981ddd0d31add41361fe7db6872c6d1fa32c8b
Time: 2017-01-28
Author: honnibal@gmail.com
File Name: examples/quora_similarity.py
Class Name: StaticVectors
Method Name: __init__