Skip to content

Commit 8fc83ae

Browse files
committed
use self.index2word, self.word_vec() instead of deprecated self.wv...
1 parent 86b9c56 commit 8fc83ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythainlp/word_vector/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ def sentence_vectorizer(text: str, use_mean: bool = True) -> np.ndarray:
263263
elif word == "\n":
264264
word = "xxeol"
265265

266-
if word in _MODEL.wv.index2word:
267-
vec += _MODEL.wv.word_vec(word)
266+
if word in _MODEL.index2word:
267+
vec += _MODEL.word_vec(word)
268268

269269
if use_mean:
270270
vec /= len(words)

0 commit comments

Comments
 (0)