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

# spec file for package python3-nltk-averaged_perceptron_tagger
# 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 taggers
%define pack averaged_perceptron_tagger
Name:           nltk-data-%{pack}
Version:        0.1
Release:        20150928gitc9887b5
Summary:        Natural Language Toolkit Data %{packgroup} %{pack}
License:        Apache-2.0
Group:          Development/Languages/Python
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python3-nltk
BuildRequires:  unzip
Recommends:     python2-nltk
Recommends:     python3-nltk
BuildArch:      noarch

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



mkdir -p %{buildroot}/%{_datarootdir}/nltk_data/packages/%{packgroup}/
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
chmod -R o-w %{pack}/

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

%defattr(-, root, root)