Shredder commited on
Commit
0a8bb92
1 Parent(s): d1ede0b

Update fincat_utils.py

Browse files
Files changed (1) hide show
  1. fincat_utils.py +1 -1
fincat_utils.py CHANGED
@@ -100,7 +100,7 @@ def bert_embedding_extract(context_text, word):
100
  word_tokens,tt,st = bert_text_preparation(word, tokenizer)
101
  word_embedding_all = []
102
  for word_tk in word_tokens:
103
- word_index = tokenized_text.find(word_tk)
104
  word_embedding = list_token_embeddings[word_index]
105
  word_embedding_all.append(word_embedding)
106
  word_embedding_mean = np.array(word_embedding_all).mean(axis=0)
 
100
  word_tokens,tt,st = bert_text_preparation(word, tokenizer)
101
  word_embedding_all = []
102
  for word_tk in word_tokens:
103
+ word_index = tokenized_text.index(word_tk)
104
  word_embedding = list_token_embeddings[word_index]
105
  word_embedding_all.append(word_embedding)
106
  word_embedding_mean = np.array(word_embedding_all).mean(axis=0)