]> git.pld-linux.org Git - packages/perl-Statistics-MaxEntropy.git/blob - perl-Statistics-MaxEntropy.spec
e48af876cfbde2025c4ed6b1c2cf6cc92525ec69
[packages/perl-Statistics-MaxEntropy.git] / perl-Statistics-MaxEntropy.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define         pdir    Statistics
7 %define         pnam    MaxEntropy
8 Summary:        MaxEntropy - Perl5 module for Maximum Entropy Modeling and Feature Induction
9 Summary(pl.UTF-8):      MaxEntropy - moduł do modelowania największej entropii i indukcji cech
10 Name:           perl-Statistics-MaxEntropy
11 Version:        0.9
12 Release:        15
13 License:        GPL v2+
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5:  b1f7972596653b423e5d65fc7e29f2ee
17 Patch0:         %{name}-paths.patch
18 BuildRequires:  perl-devel >= 1:5.8.0
19 %{?with_tests:BuildRequires:    perl-perldoc}
20 BuildRequires:  rpm-perlprov >= 4.1-13
21 Requires:       perl-perldoc
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 This module is an implementation of the Generalised and Improved
27 Iterative Scaling (GIS, IIS) algorithms and the Feature Induction (FI)
28 algorithm as defined in (Darroch and Ratcliff 1972) and (Della Pietra
29 et al. 1997). The purpose of the scaling algorithms is to find the
30 maximum entropy distribution given a set of events and (optionally) an
31 initial distribution. Also a set of candidate features may be
32 specified; then the FI algorithm may be applied to find and add the
33 candidate feature(s) that give the largest `gain' in terms of Kullback
34 Leibler divergence when it is added to the current set of features.
35
36 %description -l pl.UTF-8
37 Ten moduł jest implementacją algorytmów uogólnionego i ulepszonego
38 iteracyjnego skalowania (GIS, IIS) oraz algorytmu indukcji cech (FI -
39 Feature Induction), zdefiniowanych przez Darrocha i Ratcliffa w 1972
40 roku oraz Della Pietra i innych w 1997. Celem algorytmów skalujących
41 jest znalezienie maksymalnego rozproszenia entropii zadanej zbiorem
42 zdarzeń i (opcjonalnie) początkowym rozproszeniem. Można podać także
43 zbiór cech-kandydatów; wtedy może być zastosowany algorytm FI do
44 odnalezienia i dodanie cech-kandydatów, które dają największy zysk w
45 sensie odchylenia Kullbacka-Leiblera kiedy są dodane do aktualnego
46 zbioru cech.
47
48 %prep
49 %setup -q -n %{pdir}-%{pnam}-%{version}
50 %patch0 -p0
51
52 # kill insecure /tmp usage and possible conflict with another users' builds
53 install -d tmp
54 %{__perl} -pi -e 's@"/tmp"@"tmp"@' t/0[01]*
55
56 %build
57 %{__perl} Makefile.PL \
58         INSTALLDIRS=vendor
59 %{__make}
60
61 %{?with_tests:%{__make} test}
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65
66 %{__make} install \
67         DESTDIR=$RPM_BUILD_ROOT
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %files
73 %defattr(644,root,root,755)
74 %doc Changes README *txt
75 %attr(755,root,root) %{_bindir}/ME.wrapper.pl
76 %{perl_vendorlib}/Statistics/*.pm
77 # empty autosplit.ix files
78 #%%{perl_vendorlib}/auto/Statistics/Candidates
79 #%%{perl_vendorlib}/auto/Statistics/MaxEntropy
80 #%%{perl_vendorlib}/auto/Statistics/SparseVector
81 %{_mandir}/man[13]/*
This page took 0.039972 seconds and 2 git commands to generate.