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