about summary refs log tree commit diff
path: root/pkgs/development/python-modules/bpemb/default.nix
blob: 03f4ae1cd2160c116dbef457c08581307b1ece36 (plain) (blame)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  setuptools,

  gensim,
  numpy,
  requests,
  sentencepiece,
  tqdm,
}:

buildPythonPackage {
  pname = "bpemb";
  version = "0.3.5";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "bheinzerling";
    repo = "bpemb";
    rev = "ec85774945ca76dd93c1d9b4af2090e80c5779dc";
    hash = "sha256-nVaMXb5TBhO/vWE8AYAA3P9dSPI8O+rmzFvbEj8VEkE=";
  };

  build-system = [ setuptools ];

  dependencies = [
    gensim
    numpy
    requests
    sentencepiece
    tqdm
  ];

  # need network connection for tests
  doCheck = false;

  pythonImportsCheck = [ "bpemb" ];

  meta = with lib; {
    description = "Byte-pair embeddings in 275 languages";
    homepage = "https://github.com/bheinzerling/bpemb";
    license = licenses.mit;
    maintainers = with maintainers; [ vizid ];
  };
}