1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5
6, pytestCheckHook
7, regex
8}:
9
10buildPythonPackage rec {
11 pname = "sentence-splitter";
12 version = "1.4";
13
14 disabled = pythonOlder "3.5";
15
16 src = fetchFromGitHub {
17 owner = "mediacloud";
18 repo = "sentence-splitter";
19 rev = version;
20 hash = "sha256-FxRi8fhKB9++lCTFpCAug0fxjkSVTKChLY84vkshR34=";
21 };
22
23 propagatedBuildInputs = [
24 regex
25 ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 ];
30
31 pythonImportsCheck = [
32 "sentence_splitter"
33 ];
34
35 meta = with lib; {
36 description = "Text to sentence splitter using heuristic algorithm by Philipp Koehn and Josh Schroeder";
37 homepage = "https://github.com/mediacloud/sentence-splitter";
38 license = licenses.lgpl3Plus;
39 maintainers = with maintainers; [ paveloom ];
40 };
41}