1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 setuptools,
7
8 gensim,
9 numpy,
10 requests,
11 sentencepiece,
12 tqdm,
13}:
14
15buildPythonPackage {
16 pname = "bpemb";
17 version = "0.3.5";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "bheinzerling";
22 repo = "bpemb";
23 rev = "ec85774945ca76dd93c1d9b4af2090e80c5779dc";
24 hash = "sha256-nVaMXb5TBhO/vWE8AYAA3P9dSPI8O+rmzFvbEj8VEkE=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 gensim
31 numpy
32 requests
33 sentencepiece
34 tqdm
35 ];
36
37 # need network connection for tests
38 doCheck = false;
39
40 pythonImportsCheck = [ "bpemb" ];
41
42 meta = with lib; {
43 description = "Byte-pair embeddings in 275 languages";
44 homepage = "https://github.com/bheinzerling/bpemb";
45 license = licenses.mit;
46 maintainers = with maintainers; [ vizid ];
47 };
48}