[Groonga-commit] ranguba/chupa-text-decomposer-spreadsheet at dfd6377 [master] Add support for target_score

Back to archive index
Kouhei Sutou null+****@clear*****
Mon Feb 25 12:05:49 JST 2019


Kouhei Sutou	2019-02-25 12:05:49 +0900 (Mon, 25 Feb 2019)

  Revision: dfd6377281a825900140305a1553ce94fbf859d6
  https://github.com/ranguba/chupa-text-decomposer-spreadsheet/commit/dfd6377281a825900140305a1553ce94fbf859d6

  Message:
    Add support for target_score

  Modified files:
    lib/chupa-text/decomposers/spreadsheet.rb

  Modified: lib/chupa-text/decomposers/spreadsheet.rb (+10 -1)
===================================================================
--- lib/chupa-text/decomposers/spreadsheet.rb    2018-06-18 18:17:53 +0900 (24b8f56)
+++ lib/chupa-text/decomposers/spreadsheet.rb    2019-02-25 12:05:49 +0900 (1e3c2a3)
@@ -16,7 +16,16 @@ module ChupaText
       ]
 
       def target?(data)
-        TARGET_EXTENSIONS.include?(data.extension) || TARGET_MIME_TYPES.include?(data.mime_type)
+        TARGET_EXTENSIONS.include?(data.extension) or
+          TARGET_MIME_TYPES.include?(data.mime_type)
+      end
+
+      def target_score(data)
+        if target?(data)
+          10
+        else
+          nil
+        end
       end
 
       def decompose(data)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190225/5791cf17/attachment-0001.html>


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