2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
emoji,
|
|
|
|
fetchFromGitHub,
|
|
|
|
networkx,
|
|
|
|
numpy,
|
|
|
|
peft,
|
|
|
|
protobuf,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
six,
|
|
|
|
toml,
|
|
|
|
torch,
|
|
|
|
tqdm,
|
|
|
|
transformers,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stanza";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.9.2";
|
2022-09-22 12:36:57 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
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}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-hrRn6ITsN7kFL1T6VjSXPDytANEeJYKwMaSdCG+YJyM=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
emoji
|
2024-01-13 08:15:51 +00:00
|
|
|
networkx
|
2021-12-06 16:07:01 +00:00
|
|
|
numpy
|
2024-01-13 08:15:51 +00:00
|
|
|
peft
|
2021-12-06 16:07:01 +00:00
|
|
|
protobuf
|
|
|
|
requests
|
|
|
|
six
|
2024-01-13 08:15:51 +00:00
|
|
|
toml
|
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;
|
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
|
|
|
};
|
|
|
|
}
|