Merge pull request #253417 from npatsakula/natasha

python311Packages.natasha: init at 1.6.0
This commit is contained in:
OTABI Tomoya 2023-09-11 22:23:19 +09:00 committed by GitHub
commit a24c954961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 199 additions and 0 deletions

View File

@ -0,0 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
, intervaltree
}:
buildPythonPackage rec {
pname = "ipymarkup";
version = "0.9.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-P0v6EP1mKTIBr4SEp+a8tyO/LjPZpqoAiCZxr5yiaRE=";
};
propagatedBuildInputs = [ intervaltree ];
pythonImportCheck = [ "ipymarkup" ];
# Upstream has no tests:
doCheck = false;
meta = with lib; {
description = "Collection of NLP visualizations for NER and syntax tree markup";
homepage = "https://github.com/natasha/ipymarkup";
license = licenses.mit;
maintainers = with maintainers; [ npatsakula ];
};
}

View File

@ -0,0 +1,35 @@
{ lib
, buildPythonPackage
, fetchPypi
, pymorphy2
, razdel
, navec
, slovnet
, yagry
, ipymarkup
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "natasha";
version = "1.6.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-Rgguazgq06a8B9jeRnfHD5VTR+Xrd+8OCsQUfaGLEq0=";
};
propagatedBuildInputs = [ pymorphy2 navec razdel slovnet yagry ipymarkup ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "tests/" ];
pythonImportCheck = [ "natasha" ];
meta = with lib; {
description = "NLP framework for Russian language";
homepage = "https://github.com/natasha/natasha";
license = licenses.mit;
maintainers = with maintainers; [ npatsakula ];
};
}

View File

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchPypi
, numpy
, razdel
, gensim
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "navec";
version = "0.10.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-TyNHSxwnmvbGBfhOeHPofEfKWLDFOKP50w2QxgnJ/SE=";
};
propagatedBuildInputs = [ numpy razdel ];
nativeCheckInputs = [ pytestCheckHook gensim ];
# TODO: remove when gensim usage will be fixed in `navec`.
disabledTests = [ "test_gensim" ];
pythonImportCheck = [ "navec" ];
meta = with lib; {
description = "Compact high quality word embeddings for Russian language";
homepage = "https://github.com/natasha/navec";
license = licenses.mit;
maintainers = with maintainers; [ npatsakula ];
};
}

View File

@ -0,0 +1,27 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "razdel";
version = "0.5.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-QzTA/f401OiIzw7YVJaMnfFPClR9+Qmnf0Y0+f/mJuY=";
};
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "razdel" ];
pythonImportCheck = [ "razdel" ];
meta = with lib; {
description = "Rule-based system for Russian sentence and word tokenization";
homepage = "https://github.com/natasha/razdel";
license = licenses.mit;
maintainers = with maintainers; [ npatsakula ];
};
}

View File

@ -0,0 +1,35 @@
{ lib
, buildPythonPackage
, fetchPypi
, numpy
, razdel
, navec
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "slovnet";
version = "0.6.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-AtIle9ybnMHSQr007iyGHGSPcIPveJj+FGirzDge95k=";
};
propagatedBuildInputs = [ numpy navec razdel ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "tests/" ];
disabledTestPaths = [
# Tries to download model binary artifacts:
"tests/test_api.py"
];
pythonImportCheck = [ "slovnet" ];
meta = with lib; {
description = "Deep-learning based NLP modeling for Russian language";
homepage = "https://github.com/natasha/slovnet";
license = licenses.mit;
maintainers = with maintainers; [ npatsakula ];
};
}

View File

@ -0,0 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
, pymorphy2
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "yargy";
version = "0.16.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-yRfu+zKkDCPEa2yojWiScHLdAKuU6Q/V3GqwpitZtZM=";
};
propagatedBuildInputs = [ pymorphy2 ];
pythonImportCheck = [ "yargy" ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "tests" ];
meta = with lib; {
description = "Rule-based facts extraction for Russian language";
homepage = "https://github.com/natasha/yargu";
license = licenses.mit;
maintainers = with maintainers; [ npatsakula ];
};
}

View File

@ -5322,6 +5322,8 @@ self: super: with self; {
ipykernel = callPackage ../development/python-modules/ipykernel { };
ipymarkup = callPackage ../development/python-modules/ipymarkup { };
ipympl = callPackage ../development/python-modules/ipympl { };
ipyparallel = callPackage ../development/python-modules/ipyparallel { };
@ -7021,6 +7023,10 @@ self: super: with self; {
nanoleaf = callPackage ../development/python-modules/nanoleaf { };
navec = callPackage ../development/python-modules/navec { };
natasha = callPackage ../development/python-modules/natasha { };
nomadnet = callPackage ../development/python-modules/nomadnet { };
nox = callPackage ../development/python-modules/nox { };
@ -11065,6 +11071,8 @@ self: super: with self; {
ray = callPackage ../development/python-modules/ray { redis = pkgs.redis; };
razdel = callPackage ../development/python-modules/razdel { };
rbtools = callPackage ../development/python-modules/rbtools { };
rchitect = callPackage ../development/python-modules/rchitect { };
@ -11952,6 +11960,8 @@ self: super: with self; {
slob = callPackage ../development/python-modules/slob { };
slovnet = callPackage ../development/python-modules/slovnet { };
slowapi = callPackage ../development/python-modules/slowapi { };
slugid = callPackage ../development/python-modules/slugid { };
@ -14070,6 +14080,8 @@ self: super: with self; {
yarg = callPackage ../development/python-modules/yarg { };
yagry = callPackage ../development/python-modules/yargy { };
yark = callPackage ../development/python-modules/yark { };
yarl = callPackage ../development/python-modules/yarl { };