summaryrefslogtreecommitdiff
path: root/dev-python/nltk
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/nltk')
-rw-r--r--dev-python/nltk/Manifest3
-rw-r--r--dev-python/nltk/metadata.xml14
-rw-r--r--dev-python/nltk/nltk-3.7.ebuild62
3 files changed, 79 insertions, 0 deletions
diff --git a/dev-python/nltk/Manifest b/dev-python/nltk/Manifest
new file mode 100644
index 0000000..87ee22f
--- /dev/null
+++ b/dev-python/nltk/Manifest
@@ -0,0 +1,3 @@
+DIST nltk-3.7.tar.gz 2851947 BLAKE2B 4cd4fed9f26de7996bcabbd71d500c072489e79ae0edb29f09577e465227c948efa7130af6975b029e77fb79db015437a9e3311eb28048d02dcc2356441d0908 SHA512 66d79afa59f18f2bf7d086dcb22813c7b92239c05669daa62866dbda06c0ca22367317749cf19db3e41a7bdb405d4f87f72b695aa58fd0669bf36de64f1f9888
+EBUILD nltk-3.7.ebuild 1755 BLAKE2B 3c40b0fbfb1504a9753260d83a8738c8831c4aa27cf887e5b7bd2e17c5d08ee13553f2100d706b84622d2a8f1ef323ac7e9d99fecc8102c1363df6ed4512b389 SHA512 e01b50813f6a727a1073df862443ed243f016defd3b8d5bf94efeff85384c2421ca8647816ceeca1d995a304c04a38314d15843cd084e590a1c4dc64cca0f49f
+MISC metadata.xml 445 BLAKE2B 4bfcde721368b9c9354799863a7a78d2c04eb789672f52b5449bda3ef567448fa1b434dda9d150aa0ff360477c576ea2fd0bebce40bf80bb843393e245f85278 SHA512 89bb6d0ca2e268e3540cf36e91b57e834eb31f078a91bb7ed7218a17c1a9b63809ae77916822eabf6a3a86286d00ae4a311b33c52e40d9d2e61b6d242f4cef78
diff --git a/dev-python/nltk/metadata.xml b/dev-python/nltk/metadata.xml
new file mode 100644
index 0000000..622f82f
--- /dev/null
+++ b/dev-python/nltk/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>marcin.deranek@slonko.net</email>
+ <name>Marcin Deranek</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="google-code">nltk</remote-id>
+ <remote-id type="pypi">nltk</remote-id>
+ <remote-id type="github">nltk/nltk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/nltk/nltk-3.7.ebuild b/dev-python/nltk/nltk-3.7.ebuild
new file mode 100644
index 0000000..09aa17e
--- /dev/null
+++ b/dev-python/nltk/nltk-3.7.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="sqlite,tk?,xml(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Natural Language Toolkit"
+HOMEPAGE="https://www.nltk.org/ https://github.com/nltk/nltk/"
+SRC_URI="https://github.com/nltk/nltk/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~ppc64 ~riscv x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
+IUSE="tk"
+
+RDEPEND="
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/joblib[${PYTHON_USEDEP}]
+ dev-python/regex[${PYTHON_USEDEP}]
+ dev-python/tqdm[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/joblib[${PYTHON_USEDEP}]
+ >=dev-python/nltk-data-20211221
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/twython[${PYTHON_USEDEP}]
+ sci-libs/scikit-learn[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ )"
+PDEPEND="dev-python/nltk-data"
+
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+ # Internet
+ unit/test_downloader.py::test_downloader_using_existing_parent_download_dir
+ unit/test_downloader.py::test_downloader_using_non_existing_parent_download_dir
+)
+
+src_prepare() {
+ # requires unpackaged pycrfsuite
+ sed -i -e '/>>>/s@$@ # doctest: +SKIP@' nltk/tag/crf.py || die
+ # replace fetching from network with duplicate file URL
+ sed -e 's@https://raw.githubusercontent.com/nltk/nltk/develop/nltk/test/toy.cfg@nltk:grammars/sample_grammars/toy.cfg@' \
+ -i nltk/test/data.doctest || die
+
+ distutils-r1_src_prepare
+}
+
+src_test() {
+ cd nltk/test || die
+ distutils-r1_src_test
+}