- Set cost_factor (see: mecab-users mailing list)
This commit is contained in:
parent
ea674d5e33
commit
6995c4269f
13
mecab-0.97-cost-factor.patch
Normal file
13
mecab-0.97-cost-factor.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- mecab-0.97/src/viterbi.cpp.debug 2007-11-26 02:27:12.000000000 +0900
|
||||
+++ mecab-0.97/src/viterbi.cpp 2008-04-08 16:56:12.000000000 +0900
|
||||
@@ -67,6 +67,10 @@
|
||||
|
||||
copy_sentence_ = param.get<bool>("allocate-sentence");
|
||||
cost_factor_ = param.get<int>("cost-factor");
|
||||
+
|
||||
+ // http://lists.sourceforge.jp/mailman/archives/mecab-users/2008-April/000324.html
|
||||
+ if ( cost_factor_ <= 0 ) cost_factor_ = 700;
|
||||
+
|
||||
CHECK_FALSE(cost_factor_ > 0) << "cost-factor is empty";
|
||||
|
||||
set_theta(param.get<double>("theta"));
|
@ -19,6 +19,8 @@ Group: Applications/Text
|
||||
License: BSD or LGPLv2+ or GPL+
|
||||
URL: http://mecab.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{mainver}%{?betaver}.tar.gz
|
||||
# http://lists.sourceforge.jp/mailman/archives/mecab-users/2008-April/000324.html
|
||||
Patch0: mecab-0.97-cost-factor.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
@ -40,6 +42,7 @@ for MeCab.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{mainver}%{?betaver}
|
||||
%patch0 -p1 -b .cost
|
||||
|
||||
# compiler flags fix
|
||||
%{__sed} -i.flags \
|
||||
@ -109,6 +112,10 @@ cd ..
|
||||
%{_includedir}/%{name}.h
|
||||
|
||||
%changelog
|
||||
* Tue Apr 8 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.97-2
|
||||
- Set cost_factor
|
||||
(see: mecab-users mailing list)
|
||||
|
||||
* Sun Feb 3 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.97-1
|
||||
- 0.97
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user