[Groonga-commit] ranguba/chupa-text at 33d7fbf [master] Fix decomposer choose logic

Back to archive index
Kouhei Sutou null+****@clear*****
Tue Mar 26 18:13:28 JST 2019


Kouhei Sutou	2019-03-26 18:13:28 +0900 (Tue, 26 Mar 2019)

  Revision: 33d7fbf51813a0f1a856477dd7f5899fadcc9a76
  https://github.com/ranguba/chupa-text/commit/33d7fbf51813a0f1a856477dd7f5899fadcc9a76

  Message:
    Fix decomposer choose logic
    
    High score decomposer should be chosen.

  Modified files:
    lib/chupa-text/extractor.rb

  Modified: lib/chupa-text/extractor.rb (+1 -1)
===================================================================
--- lib/chupa-text/extractor.rb    2019-03-04 06:57:53 +0900 (c6eb6fa)
+++ lib/chupa-text/extractor.rb    2019-03-26 18:13:28 +0900 (096f3d1)
@@ -79,7 +79,7 @@ module ChupaText
         candidates << [score, decomposer]
       end
       return nil if candidates.empty?
-      candidate = candidates.sort_by {|score, _| score}.first
+      candidate = candidates.sort_by {|score, _| -score}.first
       candidate[1]
     end
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190326/bd958a5c/attachment.html>


More information about the Groonga-commit mailing list
Back to archive index