3 %bcond_without tests # do not perform "make test"
5 %define pdir Statistics
6 %define pnam MaxEntropy
7 %include /usr/lib/rpm/macros.perl
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 URL: http://search.cpan.org/dist/Statistics-MaxEntropy/
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: perl-perldoc
24 Requires: perl-perldoc
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This module is an implementation of the Generalised and Improved
30 Iterative Scaling (GIS, IIS) algorithms and the Feature Induction (FI)
31 algorithm as defined in (Darroch and Ratcliff 1972) and (Della Pietra
32 et al. 1997). The purpose of the scaling algorithms is to find the
33 maximum entropy distribution given a set of events and (optionally) an
34 initial distribution. Also a set of candidate features may be
35 specified; then the FI algorithm may be applied to find and add the
36 candidate feature(s) that give the largest `gain' in terms of Kullback
37 Leibler divergence when it is added to the current set of features.
39 %description -l pl.UTF-8
40 Ten moduł jest implementacją algorytmów uogólnionego i ulepszonego
41 iteracyjnego skalowania (GIS, IIS) oraz algorytmu indukcji cech (FI -
42 Feature Induction), zdefiniowanych przez Darrocha i Ratcliffa w 1972
43 roku oraz Della Pietra i innych w 1997. Celem algorytmów skalujących
44 jest znalezienie maksymalnego rozproszenia entropii zadanej zbiorem
45 zdarzeń i (opcjonalnie) początkowym rozproszeniem. Można podać także
46 zbiór cech-kandydatów; wtedy może być zastosowany algorytm FI do
47 odnalezienia i dodanie cech-kandydatów, które dają największy zysk w
48 sensie odchylenia Kullbacka-Leiblera kiedy są dodane do aktualnego
52 %setup -q -n %{pdir}-%{pnam}-%{version}
55 # kill insecure /tmp usage and possible conflict with another users' builds
57 %{__perl} -pi -e 's@"/tmp"@"tmp"@' t/0[01]*
60 %{__perl} Makefile.PL \
64 %{?with_tests:%{__make} test}
67 rm -rf $RPM_BUILD_ROOT
70 DESTDIR=$RPM_BUILD_ROOT
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
77 %doc Changes README *txt
78 %attr(755,root,root) %{_bindir}/ME.wrapper.pl
79 %{perl_vendorlib}/Statistics/*.pm
80 # empty autosplit.ix files
81 #%%{perl_vendorlib}/auto/Statistics/Candidates
82 #%%{perl_vendorlib}/auto/Statistics/MaxEntropy
83 #%%{perl_vendorlib}/auto/Statistics/SparseVector