[735bb5]: / test / features / test_sentence_embedding.py

Download this file

18 lines (12 with data), 517 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Local Dependencies
# ------------------
from features.sentence_embedding import SentenceEmbedding
# Tests
# ------
def test_sentence_embedding_init(wv_model):
se = SentenceEmbedding(wv_model)
assert isinstance(se, SentenceEmbedding)
def test_create_sentence_embedding(n2c2_small_collection, wv_model):
se = SentenceEmbedding(wv_model)
embeddings = se.create_sentence_embedding(n2c2_small_collection)
assert embeddings.shape == (len(n2c2_small_collection), wv_model.vector_size)