vec = np.zeros(shape=(1, size), dtype=np.float32) for word in data: try: vec += self.w2v.wv[word] except: length -= 1 continue vec = vec / length return vec def compute_cosine(self,s1,s2): vec1 = self.word2vec_transform(s1) vec2 = self.word2vec_transform(s2) return co...