python3Packages.ingredient-parser-nlp: init at 2.0.0
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
|
||||
setuptools,
|
||||
|
||||
nltk,
|
||||
python-crfsuite,
|
||||
pint,
|
||||
floret,
|
||||
|
||||
pytestCheckHook,
|
||||
nltk-data,
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "ingredient-parser-nlp";
|
||||
version = "2.0.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "strangetom";
|
||||
repo = "ingredient-parser";
|
||||
tag = version;
|
||||
hash = "sha256-i14RKBcvU56pDNGxNVBvvpQ65FCbitMIfvN5eLLJCWU=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
nltk
|
||||
python-crfsuite
|
||||
pint
|
||||
floret
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"ingredient_parser"
|
||||
];
|
||||
|
||||
# Needed for tests
|
||||
preCheck = ''
|
||||
export NLTK_DATA=${nltk-data.averaged_perceptron_tagger_eng}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Parse structured information from recipe ingredient sentences";
|
||||
license = lib.licenses.mit;
|
||||
homepage = "https://github.com/strangetom/ingredient-parser/";
|
||||
changelog = "https://github.com/strangetom/ingredient-parser/releases/tag/${version}";
|
||||
maintainers = with lib.maintainers; [ antonmosich ];
|
||||
};
|
||||
}
|
||||
@@ -6630,6 +6630,8 @@ self: super: with self; {
|
||||
|
||||
inform = callPackage ../development/python-modules/inform { };
|
||||
|
||||
ingredient-parser-nlp = callPackage ../development/python-modules/ingredient-parser-nlp { };
|
||||
|
||||
iniconfig = callPackage ../development/python-modules/iniconfig { };
|
||||
|
||||
inifile = callPackage ../development/python-modules/inifile { };
|
||||
|
||||
Reference in New Issue
Block a user