diff --git a/nltk-3.4.5.zip b/nltk-3.4.5.zip deleted file mode 100644 index 5ae8c52..0000000 --- a/nltk-3.4.5.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bed45551259aa2101381bbdd5df37d44ca2669c5c3dad72439fa459b29137d94 -size 1450555 diff --git a/nltk-3.5.zip b/nltk-3.5.zip new file mode 100644 index 0000000..799be7a --- /dev/null +++ b/nltk-3.5.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:845365449cd8c5f9731f7cb9f8bd6fd0767553b9d53af9eb1b3abf7700936b35 +size 1433531 diff --git a/python-nltk.changes b/python-nltk.changes index 2402a6c..8ca07dd 100644 --- a/python-nltk.changes +++ b/python-nltk.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Thu Apr 23 13:54:08 UTC 2020 - John Vandenberg + +- Update to v3.5 + * add support for Python 3.8 + * drop support for Python 2 + * create NLTK's own Tokenizer class distinct from the Treebank + reference tokeniser + * update Vader sentiment analyser + * fix JSON serialization of some PoS taggers + * minor improvements in grammar.CFG, Vader, pl196x corpus reader, + StringTokenizer + * change implementation <= and >= for FreqDist so they are partial + orders + * make FreqDist iterable + * correctly handle Penn Treebank trees with a unlabeled branching + top node + ------------------------------------------------------------------- Sat Mar 14 09:07:16 UTC 2020 - Tomáš Chvátal diff --git a/python-nltk.spec b/python-nltk.spec index e964065..842ad5f 100644 --- a/python-nltk.spec +++ b/python-nltk.spec @@ -1,7 +1,7 @@ # # spec file for package python-nltk # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,22 +17,22 @@ %{!?python_module:%define python_module() python-%{**} python3-%{**}} -%define interps python python3 %define pyname nltk -%bcond_without python2 Name: python-nltk -Version: 3.4.5 +Version: 3.5 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: %{interps} +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 @@ -43,13 +43,9 @@ Recommends: python-requests Recommends: python-scikit-learn Recommends: python-scipy Recommends: python-twython +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch -%if %{with python2} -BuildRequires: python-singledispatch -%endif -%ifpython2 -Requires: python-singledispatch -%endif %python_subpackages %description @@ -71,6 +67,7 @@ sed -i "1,4{/\/usr\/bin\/env/d}" nltk/tokenize/stanford_segmenter.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/nltk %{python_expand %fdupes %{buildroot}%{$python_sitelib}/ chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest @@ -80,10 +77,17 @@ chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest # 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