python3Packages.spacy-transformers: init at 1.0.2

This package provides spaCy model pipelines that wrap Hugging Face's
transformers package, so that they can be used in spaCy.
This commit is contained in:
Daniël de Kok 2021-05-16 10:01:08 +02:00 committed by Jonathan Ringer
parent a3405dfa26
commit e15fd57929
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,39 @@
{ lib
, fetchPypi
, buildPythonPackage
, pytorch
, spacy
, spacy-alignments
, srsly
, transformers
}:
buildPythonPackage rec {
pname = "spacy-transformers";
version = "1.0.2";
src = fetchPypi {
inherit pname version;
hash = "sha256-AYshH2trMTgeSkAPRb6wRWpm4gA5FaKV2NJd+PhzAy4=";
};
propagatedBuildInputs = [
pytorch
spacy
spacy-alignments
srsly
transformers
];
# Test fails due to missing arguments for trfs2arrays().
doCheck = false;
pythonImportsCheck = [ "spacy_transformers" ];
meta = with lib; {
description = "spaCy pipelines for pretrained BERT, XLNet and GPT-2";
homepage = "https://github.com/explosion/spacy-transformers";
license = licenses.mit;
maintainers = with maintainers; [ danieldk ];
};
}

View File

@ -7724,6 +7724,8 @@ in {
spacy-pkuseg = callPackage ../development/python-modules/spacy-pkuseg { };
spacy-transformers = callPackage ../development/python-modules/spacy-transformers { };
spake2 = callPackage ../development/python-modules/spake2 { };
spark_parser = callPackage ../development/python-modules/spark_parser { };