2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
poetry-core,
|
|
|
|
regex,
|
|
|
|
langcodes,
|
|
|
|
ftfy,
|
|
|
|
msgpack,
|
|
|
|
mecab-python3,
|
|
|
|
jieba,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "wordfreq";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "3.0.2";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rspeer";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "wordfreq";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-ANOBbQWLB35Vz6oil6QZDpsNpKHeKUJnDKA5Q9JRVdE=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
regex
|
|
|
|
langcodes
|
|
|
|
ftfy
|
|
|
|
msgpack
|
|
|
|
mecab-python3
|
|
|
|
jieba
|
|
|
|
];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# These languages require additional dictionaries that aren't packaged
|
|
|
|
"test_languages"
|
|
|
|
"test_japanese"
|
|
|
|
"test_korean"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library for looking up the frequencies of words in many languages, based on many sources of data";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://github.com/rspeer/wordfreq/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|