2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, cython
|
|
|
|
, numpy
|
|
|
|
, srsly
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spacy-pkuseg";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.0.33";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "spacy_pkuseg";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-8TFWrE4ERg8aw17f0DbplwTbutGa0KObBsNA+AKinmI=";
|
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
|
|
|
};
|
|
|
|
}
|