2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
|
|
|
pytestCheckHook,
|
|
|
|
regex,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sentence-splitter";
|
|
|
|
version = "1.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mediacloud";
|
|
|
|
repo = "sentence-splitter";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-FxRi8fhKB9++lCTFpCAug0fxjkSVTKChLY84vkshR34=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ regex ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "sentence_splitter" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Text to sentence splitter using heuristic algorithm by Philipp Koehn and Josh Schroeder";
|
|
|
|
homepage = "https://github.com/mediacloud/sentence-splitter";
|
|
|
|
license = licenses.lgpl3Plus;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
}
|