1{ lib
2, buildPythonPackage
3, fetchPypi
4, numpy
5, six
6, scipy
7, smart_open
8, scikitlearn
9, testfixtures
10, unittest2
11}:
12
13buildPythonPackage rec {
14 pname = "gensim";
15 name = "${pname}-${version}";
16 version = "3.3.0";
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "6b2a813887583e63c8cedd26a91782e5f1e416a11f85394a92ae3ff908e0be03";
20 };
21
22 propagatedBuildInputs = [ smart_open numpy six scipy
23 # scikitlearn testfixtures unittest2 # for tests
24 ];
25 doCheck = false;
26
27 # Two tests fail.
28
29 # ERROR: testAddMorphemesToEmbeddings (gensim.test.test_varembed_wrapper.TestVarembed)
30 # ImportError: Could not import morfessor.
31 # This package is not in nix
32
33 # ERROR: testWmdistance (gensim.test.test_fasttext_wrapper.TestFastText)
34 # ImportError: Please install pyemd Python package to compute WMD.
35 # This package is not in nix
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}