2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
click,
|
|
|
|
joblib,
|
|
|
|
regex,
|
|
|
|
tqdm,
|
2020-06-15 15:56:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nltk";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "3.8.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
extension = "zip";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-GDTaPQaCy6Tyzt4vmq1rD6+2RhukUdsO+2+cOXmNZNM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
joblib
|
|
|
|
regex
|
|
|
|
tqdm
|
2022-01-03 16:56:52 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Tests require some data, the downloading of which is impure. It would
|
|
|
|
# probably make sense to make the data another derivation, but then feeding
|
|
|
|
# that into the tests (given that we need nltk itself to download the data,
|
|
|
|
# unless there's an easy way to download it without nltk's downloader) might
|
|
|
|
# be complicated. For now let's just disable the tests and hope for the
|
|
|
|
# best.
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "nltk" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Natural Language Processing ToolKit";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "nltk";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://nltk.org/";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = licenses.asl20;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|