3 %bcond_without tests # do not perform "make test"
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
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
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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
49 %setup -q -n %{pdir}-%{pnam}-%{version}
52 # kill insecure /tmp usage and possible conflict with another users' builds
54 %{__perl} -pi -e 's@"/tmp"@"tmp"@' t/0[01]*
57 %{__perl} Makefile.PL \
61 %{?with_tests:%{__make} test}
64 rm -rf $RPM_BUILD_ROOT
67 DESTDIR=$RPM_BUILD_ROOT
70 rm -rf $RPM_BUILD_ROOT
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