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