Failed
tests.test_api.test_export (from pytest)
Failing for the past 4 builds
(Since Failed )
This test is unclaimed |
Error Message
AttributeError: type object 'Corpus' has no attribute 'export_svmlight'
Stacktrace
corpus = <cophi.model.Corpus object at 0x7f97bd4cccc0> def test_export(corpus): output = pathlib.Path("corpus.svmlight") > cophi.export(corpus.dtm, output, "svmlight") tests/test_api.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtm = a b c d e f document 1 1 1 1 1 1 filepath = PosixPath('corpus.svmlight'), format = 'svmlight' def export(dtm, filepath, format="text"): """Export a document-term matrix. Parameters: dtm: A document-term matrix. filepath: Path to output file. Possibel values are `plaintext`/`text` or `svmlight`. format: File format. """ if format.lower() in {"plaintext", "text"}: cophi.model.Corpus.export_plaintext(dtm, filepath) elif format.lower() in {"svmlight"}: > cophi.model.Corpus.export_svmlight(dtm, filepath) E AttributeError: type object 'Corpus' has no attribute 'export_svmlight' src/cophi/api.py:98: AttributeError