Пример #1
0
def test_docvectorizer_todataframe(test_text_info):
    test_text, vocabulary = test_text_info
    model = DocVectorizer().fit(test_text)
    df = model.to_DataFrame()
    if test_text == test_text_example:
        assert df.shape == (5, 7)
    else:
        assert df.shape[0] == len(test_text)
        assert df.shape[1] <= len(vocabulary)
Пример #2
0
def test_docvectorizer_todataframe():
    model = DocVectorizer().fit(test_text)
    df = model.to_DataFrame()
    assert df.shape == (5, 7)