1{ lib
2, buildPythonPackage
3, fetchPypi
4, numpy
5, six
6, scipy
7, smart-open
8, scikit-learn, testfixtures, unittest2
9, isPy3k
10}:
11
12buildPythonPackage rec {
13 pname = "gensim";
14 version = "4.1.2";
15 disabled = !isPy3k;
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "1932c257de4eccbb64cc40d46e8577a25f5f47b94b96019a969fb36150f11d15";
20 };
21
22 propagatedBuildInputs = [ smart-open numpy six scipy ];
23
24 checkInputs = [ scikit-learn testfixtures unittest2 ];
25
26 # Two tests fail.
27 #
28 # ERROR: testAddMorphemesToEmbeddings (gensim.test.test_varembed_wrapper.TestVarembed)
29 # ImportError: Could not import morfessor.
30 # This package is not in nix
31 #
32 # ERROR: testWmdistance (gensim.test.test_fasttext_wrapper.TestFastText)
33 # ImportError: Please install pyemd Python package to compute WMD.
34 # This package is not in nix
35 doCheck = false;
36
37 meta = {
38 description = "Topic-modelling library";
39 homepage = "https://radimrehurek.com/gensim/";
40 license = lib.licenses.lgpl21;
41 maintainers = with lib.maintainers; [ jyp ];
42 };
43}