From 79563a80119d2b0e7f4c3492a7276c9c8b92fa3d Mon Sep 17 00:00:00 2001 From: Wannaphong Phatthiyaphaibun Date: Sat, 3 Apr 2021 07:04:56 +0700 Subject: [PATCH 1/2] Change gensim api for thai2fit word2vec --- pythainlp/word_vector/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythainlp/word_vector/core.py b/pythainlp/word_vector/core.py index 67ef0f4d2..14898c817 100644 --- a/pythainlp/word_vector/core.py +++ b/pythainlp/word_vector/core.py @@ -257,7 +257,7 @@ def sentence_vectorizer(text: str, use_mean: bool = True) -> ndarray: elif word == "\n": word = _TK_EOL - if word in _MODEL.index2word: + if word in _MODEL.index_to_key: vec += _MODEL.word_vec(word) if use_mean: From d8fff27cc7483b52414fcf632dd9b309d9f7b21d Mon Sep 17 00:00:00 2001 From: Wannaphong Phatthiyaphaibun Date: Sat, 3 Apr 2021 19:17:14 +0700 Subject: [PATCH 2/2] Update test.yml --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 17fcafcc8..cc7e55cfe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,8 +2,6 @@ name: Unit test and code coverage on: push: - branches: - - dev paths-ignore: - '**.md' - 'docs/**'