2021-10-29 15:11:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, emoji
|
2022-09-18 09:14:25 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-29 15:11:32 +00:00
|
|
|
, numpy
|
|
|
|
, protobuf
|
2022-09-18 09:14:25 +00:00
|
|
|
, pythonOlder
|
2021-10-29 15:11:32 +00:00
|
|
|
, requests
|
|
|
|
, six
|
2022-08-30 15:41:22 +00:00
|
|
|
, torch
|
2021-10-29 15:11:32 +00:00
|
|
|
, tqdm
|
2022-09-18 09:14:25 +00:00
|
|
|
, transformers
|
2021-10-29 15:11:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stanza";
|
2023-03-14 20:08:58 +00:00
|
|
|
version = "1.5.0";
|
2022-09-18 09:14:25 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-10-29 15:11:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stanfordnlp";
|
|
|
|
repo = pname;
|
2022-07-16 10:59:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-14 20:08:58 +00:00
|
|
|
hash = "sha256-sFGAVavY16UQNJmW467+Ekojws59UMcAoCc1t9wWHM4=";
|
2021-10-29 15:11:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
emoji
|
|
|
|
numpy
|
|
|
|
protobuf
|
|
|
|
requests
|
|
|
|
six
|
2022-08-30 15:41:22 +00:00
|
|
|
torch
|
2021-10-29 15:11:32 +00:00
|
|
|
tqdm
|
2022-09-18 09:14:25 +00:00
|
|
|
transformers
|
2021-10-29 15:11:32 +00:00
|
|
|
];
|
|
|
|
|
2022-09-18 09:14:25 +00:00
|
|
|
# Tests require network access
|
2021-10-29 15:11:32 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-09-18 09:14:25 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"stanza"
|
|
|
|
];
|
2021-10-29 15:11:32 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Official Stanford NLP Python Library for Many Human Languages";
|
|
|
|
homepage = "https://github.com/stanfordnlp/stanza/";
|
2023-03-15 08:34:25 +00:00
|
|
|
changelog = "https://github.com/stanfordnlp/stanza/releases/tag/v${version}";
|
2021-10-29 15:11:32 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ riotbib ];
|
|
|
|
};
|
|
|
|
}
|