2021-05-16 08:01:08 +00:00
|
|
|
{ lib
|
2021-05-16 08:11:31 +00:00
|
|
|
, callPackage
|
2021-05-16 08:01:08 +00:00
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
2022-08-30 15:41:22 +00:00
|
|
|
, torch
|
2021-10-05 15:02:29 +00:00
|
|
|
, pythonOlder
|
2021-05-16 08:01:08 +00:00
|
|
|
, spacy
|
|
|
|
, spacy-alignments
|
|
|
|
, srsly
|
|
|
|
, transformers
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spacy-transformers";
|
2023-02-09 12:50:58 +00:00
|
|
|
version = "1.2.2";
|
2022-05-01 10:41:06 +00:00
|
|
|
format = "setuptools";
|
2021-10-05 15:02:29 +00:00
|
|
|
|
2022-11-28 01:26:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-16 08:01:08 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-02-09 12:50:58 +00:00
|
|
|
hash = "sha256-Up9ZlLlAM0CDXEYDI95KsLzA0TBz/uZFqEgZLmNIABA=";
|
2021-05-16 08:01:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-08-30 15:41:22 +00:00
|
|
|
torch
|
2021-05-16 08:01:08 +00:00
|
|
|
spacy
|
|
|
|
spacy-alignments
|
|
|
|
srsly
|
|
|
|
transformers
|
|
|
|
];
|
|
|
|
|
|
|
|
# Test fails due to missing arguments for trfs2arrays().
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-05-01 10:41:06 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"spacy_transformers"
|
|
|
|
];
|
2021-05-16 08:01:08 +00:00
|
|
|
|
2021-05-16 08:11:31 +00:00
|
|
|
passthru.tests.annotation = callPackage ./annotation-test { };
|
|
|
|
|
2021-05-16 08:01:08 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "spaCy pipelines for pretrained BERT, XLNet and GPT-2";
|
|
|
|
homepage = "https://github.com/explosion/spacy-transformers";
|
2022-12-25 08:38:23 +00:00
|
|
|
changelog = "https://github.com/explosion/spacy-transformers/releases/tag/v${version}";
|
2021-05-16 08:01:08 +00:00
|
|
|
license = licenses.mit;
|
2021-09-12 14:42:12 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-05-16 08:01:08 +00:00
|
|
|
};
|
|
|
|
}
|