File nltk-data-punkt.spec of Package nltk-data-punkt

# spec file for package python3-nltk-punkt
# Copyright (c) 2017 John Vandenberg.
# 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

%define packgroup tokenizers
%define pack punkt
Name:           nltk-data-%{pack}
Version:        0.2
Release:        20130826gita2d463f
Summary:        Natural Language Toolkit Data %{packgroup} %{pack}
License:        Apache-2.0
Group:          Development/Languages/Python
BuildRequires:  python3-nltk
BuildRequires:  unzip
Recommends:     python-nltk
Recommends:     python3-nltk
BuildArch:      noarch

NLTK -- the Natural Language Toolkit Data %{packgroup} %{pack}.



mkdir -p %{buildroot}/%{_datarootdir}/nltk_data/%{packgroup}/
cp %{_sourcedir}/%{pack}.* %{buildroot}/%{_datarootdir}/nltk_data/%{packgroup}/
cd %{buildroot}/%{_datarootdir}/nltk_data/%{packgroup}/
unzip %{_sourcedir}/%{pack}.zip
rm %{pack}/PY3/README
chmod o-w %{pack}/PY3/*.pickle
ls -al punkt

export NLTK_DATA=%{buildroot}/%{_datarootdir}/nltk_data/
python3 -c 'import nltk;"nltk:%{packgroup}/%{pack}/english.pickle")'

%defattr(-, root, root)
%doc %{_datarootdir}/nltk_data/%{packgroup}/%{pack}/README

openSUSE Build Service is sponsored by