2018-04-07 16:48:02 +02:00
|
|
|
{ lib
|
2017-05-15 10:09:39 +00:00
|
|
|
, buildPythonPackage
|
2020-08-18 19:38:43 +02:00
|
|
|
, callPackage
|
2017-05-15 10:09:39 +00:00
|
|
|
, fetchPypi
|
2018-04-07 16:48:02 +02:00
|
|
|
, pythonOlder
|
2017-11-09 19:26:09 +08:00
|
|
|
, pytest
|
2020-03-13 15:40:50 +01:00
|
|
|
, blis
|
|
|
|
, catalogue
|
|
|
|
, cymem
|
2021-05-07 22:32:50 +01:00
|
|
|
, jinja2
|
2020-03-13 15:40:50 +01:00
|
|
|
, jsonschema
|
2017-05-15 10:09:39 +00:00
|
|
|
, murmurhash
|
2020-03-13 15:40:50 +01:00
|
|
|
, numpy
|
|
|
|
, pathlib
|
2017-05-15 10:09:39 +00:00
|
|
|
, plac
|
2020-03-13 15:40:50 +01:00
|
|
|
, preshed
|
2017-05-15 10:09:39 +00:00
|
|
|
, requests
|
2020-03-13 15:40:50 +01:00
|
|
|
, setuptools
|
|
|
|
, srsly
|
2021-05-07 22:04:10 +01:00
|
|
|
, spacy-legacy
|
2017-05-15 10:09:39 +00:00
|
|
|
, thinc
|
2019-05-11 15:31:31 +02:00
|
|
|
, wasabi
|
2021-05-07 22:32:50 +01:00
|
|
|
, packaging
|
|
|
|
, pathy
|
|
|
|
, pydantic
|
2017-05-15 10:09:39 +00:00
|
|
|
}:
|
|
|
|
|
2018-01-01 11:56:00 +01:00
|
|
|
buildPythonPackage rec {
|
2017-11-09 19:26:09 +08:00
|
|
|
pname = "spacy";
|
2021-03-24 10:28:28 +01:00
|
|
|
version = "3.0.5";
|
2017-05-15 10:09:39 +00:00
|
|
|
|
2018-03-14 00:02:00 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-24 10:28:28 +01:00
|
|
|
sha256 = "9f7a09fbad53aac2a3cb7696a902de62b94575a15d249dd5e26a98049328060e";
|
2017-11-09 19:26:09 +08:00
|
|
|
};
|
2017-05-15 10:09:39 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-12-12 11:37:25 +01:00
|
|
|
blis
|
|
|
|
catalogue
|
|
|
|
cymem
|
2021-05-07 22:32:50 +01:00
|
|
|
jinja2
|
2020-12-12 11:37:25 +01:00
|
|
|
jsonschema
|
|
|
|
murmurhash
|
|
|
|
numpy
|
|
|
|
plac
|
|
|
|
preshed
|
|
|
|
requests
|
|
|
|
setuptools
|
|
|
|
srsly
|
2021-05-07 22:04:10 +01:00
|
|
|
spacy-legacy
|
2020-12-12 11:37:25 +01:00
|
|
|
thinc
|
|
|
|
wasabi
|
2021-05-07 22:32:50 +01:00
|
|
|
packaging
|
|
|
|
pathy
|
|
|
|
pydantic
|
2018-04-07 16:48:02 +02:00
|
|
|
] ++ lib.optional (pythonOlder "3.4") pathlib;
|
2018-03-14 00:02:00 +01:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
2017-05-15 10:09:39 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
# checkPhase = ''
|
|
|
|
# ${python.interpreter} -m pytest spacy/tests --vectors --models --slow
|
2017-11-09 19:26:09 +08:00
|
|
|
# '';
|
|
|
|
|
2020-05-27 15:33:24 +02:00
|
|
|
postPatch = ''
|
2020-06-20 11:26:36 +02:00
|
|
|
substituteInPlace setup.cfg \
|
2020-12-12 11:35:40 +01:00
|
|
|
--replace "blis>=0.4.0,<0.8.0" "blis>=0.4.0,<1.0" \
|
2020-06-20 11:26:36 +02:00
|
|
|
--replace "catalogue>=0.0.7,<1.1.0" "catalogue>=0.0.7,<3.0" \
|
|
|
|
--replace "plac>=0.9.6,<1.2.0" "plac>=0.9.6,<2.0" \
|
|
|
|
--replace "srsly>=1.0.2,<1.1.0" "srsly>=1.0.2,<3.0" \
|
2021-05-07 22:32:50 +01:00
|
|
|
--replace "thinc>=7.4.1,<7.5.0" "thinc>=7.4.1,<8" \
|
|
|
|
--replace "pydantic>=1.7.1,<1.8.0" "pydantic>=1.7.1,<1.8.3"
|
2020-05-27 15:33:24 +02:00
|
|
|
'';
|
|
|
|
|
2020-06-20 11:26:36 +02:00
|
|
|
pythonImportsCheck = [ "spacy" ];
|
|
|
|
|
2020-12-12 11:38:39 +01:00
|
|
|
passthru.tests.annotation = callPackage ./annotation-test { };
|
2020-08-18 19:38:43 +02:00
|
|
|
|
2018-04-07 16:48:02 +02:00
|
|
|
meta = with lib; {
|
2017-05-15 10:09:39 +00:00
|
|
|
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/explosion/spaCy";
|
2017-05-15 10:09:39 +00:00
|
|
|
license = licenses.mit;
|
2021-02-01 14:50:57 +01:00
|
|
|
maintainers = with maintainers; [ sdll ];
|
2020-06-16 17:26:11 +02:00
|
|
|
};
|
2017-05-15 10:09:39 +00:00
|
|
|
}
|