1{ lib
2, buildPythonPackage
3, fetchPypi
4, numpy
5, six
6, scipy
7, smart_open
8, scikitlearn, testfixtures, unittest2
9, isPy3k
10}:
11
12buildPythonPackage rec {
13 pname = "gensim";
14 version = "3.8.0";
15 disabled = !isPy3k;
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "0rjpmxcd4hphq41y7frg6by6gwjjmrdbnim8jvx951ps5gzyfpgc";
20 };
21
22 propagatedBuildInputs = [ smart_open numpy six scipy ];
23
24 checkInputs = [ scikitlearn 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}