2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
isPy3k,
|
|
|
|
cython,
|
|
|
|
numpy,
|
|
|
|
srsly,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
srsly
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
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;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|