mecab/mecab-0.97-cost-factor.patch
Petr Šabata d9c3c5564f RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/mecab#eeaffd0815305fef59ec15abb5c1ff2b83e38ad1
2020-10-15 19:32:51 +02:00

14 lines
522 B
Diff

--- 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"));