aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/textacy/default.nix
blob: 2079dc1b9434994fa6844e1cce7f3689c61963fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{ lib, buildPythonPackage, fetchPypi, isPy27
, cachetools
, cytoolz
, jellyfish
, matplotlib
, networkx
, numpy
, pyemd
, pyphen
, pytest
, requests
, scikitlearn
, scipy
, spacy
, srsly
}:

buildPythonPackage rec {
  pname = "textacy";
  version = "0.10.0";
  disabled = isPy27;

  src = fetchPypi {
    inherit pname version;
    sha256 = "0a824333f53d19d24ca864c92da52f3fecd412f4ef3e1448864c45f06189fd6d";
  };

  propagatedBuildInputs = [
    cachetools
    cytoolz
    jellyfish
    matplotlib
    networkx
    numpy
    pyemd
    pyphen
    requests
    scikitlearn
    scipy
    spacy
    srsly
  ];

  checkInputs = [ pytest ];
  # almost all tests have to deal with downloading a dataset, only test pure tests
  checkPhase = ''
    pytest tests/test_text_utils.py \
      tests/test_utils.py \
      tests/preprocessing \
      tests/datasets/test_base_dataset.py
  '';

  meta = with lib; {
    description = "Higher-level text processing, built on spaCy";
    homepage = "https://textacy.readthedocs.io/";
    license = licenses.asl20;
    maintainers = with maintainers; [ rvl ];
  };
}