1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 pythonOlder,
6 click,
7 joblib,
8 regex,
9 tqdm,
10}:
11
12buildPythonPackage rec {
13 pname = "nltk";
14 version = "3.8.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 extension = "zip";
22 hash = "sha256-GDTaPQaCy6Tyzt4vmq1rD6+2RhukUdsO+2+cOXmNZNM=";
23 };
24
25 propagatedBuildInputs = [
26 click
27 joblib
28 regex
29 tqdm
30 ];
31
32 # Tests require some data, the downloading of which is impure. It would
33 # probably make sense to make the data another derivation, but then feeding
34 # that into the tests (given that we need nltk itself to download the data,
35 # unless there's an easy way to download it without nltk's downloader) might
36 # be complicated. For now let's just disable the tests and hope for the
37 # best.
38 doCheck = false;
39
40 pythonImportsCheck = [ "nltk" ];
41
42 meta = with lib; {
43 description = "Natural Language Processing ToolKit";
44 mainProgram = "nltk";
45 homepage = "http://nltk.org/";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ lheckemann ];
48 };
49}