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