at master 1.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 poetry-core, 5 regex, 6 langcodes, 7 ftfy, 8 msgpack, 9 mecab-python3, 10 jieba, 11 pytestCheckHook, 12 pythonOlder, 13 fetchFromGitHub, 14}: 15 16buildPythonPackage rec { 17 pname = "wordfreq"; 18 version = "3.0.2"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "rspeer"; 25 repo = "wordfreq"; 26 tag = "v${version}"; 27 hash = "sha256-ANOBbQWLB35Vz6oil6QZDpsNpKHeKUJnDKA5Q9JRVdE="; 28 }; 29 30 nativeBuildInputs = [ poetry-core ]; 31 32 propagatedBuildInputs = [ 33 regex 34 langcodes 35 ftfy 36 msgpack 37 mecab-python3 38 jieba 39 ]; 40 41 nativeCheckInputs = [ pytestCheckHook ]; 42 disabledTests = [ 43 # These languages require additional dictionaries that aren't packaged 44 "test_languages" 45 "test_japanese" 46 "test_korean" 47 ]; 48 49 meta = with lib; { 50 description = "Library for looking up the frequencies of words in many languages, based on many sources of data"; 51 homepage = "https://github.com/rspeer/wordfreq/"; 52 license = licenses.mit; 53 }; 54}