SHA256
1
0
forked from pool/python-nltk
python-nltk/python-nltk.spec
Matej Cepl 31f5bb280c - Update to 3.7
- Improve and update the NLTK team page on nltk.org (#2855,
    #2941)
  - Drop support for Python 3.6, support Python 3.10 (#2920)
- Update to 3.6.7
  - Resolve IndexError in `sent_tokenize` and `word_tokenize`
    (#2922)
- Update to 3.6.6
  - Refactor `gensim.doctest` to work for gensim 4.0.0 and up
    (#2914)
  - Add Precision, Recall, F-measure, Confusion Matrix to Taggers
    (#2862)
  - Added warnings if .zip files exist without any corresponding
    .csv files. (#2908)
  - Fix `FileNotFoundError` when the `download_dir` is
    a non-existing nested folder (#2910)
  - Rename omw to omw-1.4 (#2907)
  - Resolve ReDoS opportunity by fixing incorrectly specified
    regex (#2906, bsc#1191030, CVE-2021-3828).
  - Support OMW 1.4 (#2899)
  - Deprecate Tree get and set node methods (#2900)
  - Fix broken inaugural test case (#2903)
  - Use Multilingual Wordnet Data from OMW with newer Wordnet
    versions (#2889)
  - Keep NLTKs "tokenize" module working with pathlib (#2896)
  - Make prettyprinter to be more readable (#2893)
  - Update links to the nltk book (#2895)
  - Add `CITATION.cff` to nltk (#2880)
  - Resolve serious ReDoS in PunktSentenceTokenizer (#2869)
  - Delete old CI config files (#2881)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=36
2022-03-22 07:58:51 +00:00

95 lines
2.8 KiB
RPMSpec

#
# spec file for package python-nltk
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{!?python_module:%define python_module() python-%{**} python3-%{**}}
%define pyname nltk
%define skip_python2 1
Name: python-nltk
Version: 3.7
Release: 0
Summary: Natural Language Toolkit
License: Apache-2.0
URL: http://nltk.org/
Source: https://files.pythonhosted.org/packages/source/n/nltk/%{pyname}-%{version}.zip
BuildRequires: %{python_module regex}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
Requires: python-regex
Requires: python-six
Recommends: python-gensim
Recommends: python-matplotlib
Recommends: python-numpy
Recommends: python-pyparsing
Recommends: python-python-crfsuite
Recommends: python-requests
Recommends: python-scikit-learn
Recommends: python-scipy
Recommends: python-twython
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
%description
NLTK -- the Natural Language Toolkit -- is a suite of
Python modules, data sets and tutorials supporting research and
development in Natural Language Processing.
%prep
%autosetup -p1 -n %{pyname}-%{version}
# sed -i "1,4{/\/usr\/bin\/env/d}" nltk/corpus/reader/knbc.py
# sed -i "1,4{/\/usr\/bin\/env/d}" nltk/test/runtests.py
# sed -i "1,4{/\/usr\/bin\/env/d}" nltk/test/unit/test_tgrep.py
# sed -i "1,4{/\/usr\/bin\/env/d}" nltk/tgrep.py
# sed -i "1,4{/\/usr\/bin\/env/d}" nltk/tokenize/stanford_segmenter.py
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/nltk
%{python_expand %fdupes %{buildroot}%{$python_sitelib}/
chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest
}
%check
# FOLLOWING http://www.nltk.org/install.html
%python_exec -c "import nltk" || exit 1
%post
%python_install_alternative nltk
%postun
%python_uninstall_alternative nltk
%files %{python_files}
%doc README.md
%license LICENSE.txt
%{python_sitelib}/%{pyname}/
%{python_sitelib}/%{pyname}-%{version}-py%{python_version}.egg-info/
%python_alternative %{_bindir}/nltk
%changelog