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