2020-12-03 08:41:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchFromGitHub
|
2020-12-03 08:41:04 +00:00
|
|
|
, pythonOlder
|
|
|
|
, tqdm
|
|
|
|
, spacy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysbd";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.3.4";
|
2020-12-03 08:41:04 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# provides no sdist on pypi
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nipunsadvilkar";
|
|
|
|
repo = "pySBD";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "12p7qm237z56hw4zr03n8rycgfymhki2m9c4w3ib0mvqq122a5dp";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ tqdm spacy ];
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
doCheck = false; # requires pyconll and blingfire
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pysbd" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pysbd (Python Sentence Boundary Disambiguation) is a rule-based sentence boundary detection that works out-of-the-box across many languages";
|
|
|
|
homepage = "https://github.com/nipunsadvilkar/pySBD";
|
|
|
|
license = licenses.mit;
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = teams.tts.members;
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
}
|