Example #1
0
def test_read_glove_dupped_opened(dupped_vocab, dupped_vectors):
    with open(DATA / GLOVE_DUPPED) as f:
        w, wv = read_glove(f)
    assert w == dupped_vocab
    np.testing.assert_allclose(wv, dupped_vectors)
Example #2
0
def test_read_glove_opened(gold_vocab, gold_vectors):
    with open(DATA / GLOVE) as f:
        w, wv = read_glove(f)
    assert w == gold_vocab
    np.testing.assert_allclose(wv, gold_vectors)
Example #3
0
def test_read_glove_dupped_pathlib(dupped_vocab, dupped_vectors):
    w, wv = read_glove(DATA / GLOVE_DUPPED)
    assert w == dupped_vocab
    np.testing.assert_allclose(wv, dupped_vectors)
Example #4
0
def test_read_glove_pathlib(gold_vocab, gold_vectors):
    w, wv = read_glove(DATA / GLOVE)
    assert w == gold_vocab
    np.testing.assert_allclose(wv, gold_vectors)