2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, cython
|
|
|
|
, numpy
|
|
|
|
, srsly
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spacy-pkuseg";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "0.0.32";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "spacy_pkuseg";
|
2022-10-21 18:38:19 +00:00
|
|
|
hash = "sha256-9y2TZROOkIOl54u6jocZD4WtP5Ct3bVfacWKqGLISEw=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Does not seem to have actual tests, but unittest discover
|
|
|
|
# recognizes some non-tests as tests and fails.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cython ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ numpy srsly ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "spacy_pkuseg" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Toolkit for multi-domain Chinese word segmentation (spaCy fork)";
|
|
|
|
homepage = "https://github.com/explosion/spacy-pkuseg";
|
|
|
|
license = licenses.mit;
|
2021-09-18 10:52:07 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|