From 8f2a89506fec3aa55f31ba1eaffb48ed40cc24b7 Mon Sep 17 00:00:00 2001 From: Osamu Takiya Date: Fri, 11 Jun 2021 17:06:08 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E3=83=89=E3=83=AD?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=83=80=E3=82=A6=E3=83=B3=E3=82=AD=E3=83=A3?= =?UTF-8?q?=E3=83=A9=E5=90=8D=E6=A4=9C=E7=B4=A2=E3=81=AB=E3=81=8A=E3=81=84?= =?UTF-8?q?=E3=81=A6=20LIKE=20"%%"=20=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=A6?= =?UTF-8?q?=E5=85=A8=E3=82=AD=E3=83=A3=E3=83=A9=E5=AF=BE=E8=B1=A1=E3=81=AB?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=9F=20(#115)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/suikoden_database/pickup_character_names.rb | 6 ++++++ app/models/analyze_syntax.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/lib/suikoden_database/pickup_character_names.rb b/app/lib/suikoden_database/pickup_character_names.rb index de6a72b..f3f09ec 100644 --- a/app/lib/suikoden_database/pickup_character_names.rb +++ b/app/lib/suikoden_database/pickup_character_names.rb @@ -26,8 +26,14 @@ def skip_word?(word) false end + # check_words の中身を連続で見ていった際に、これらの語の場合はキャラ名サーチをしない def skip_words [ + '一', + 'な', + 'る', + 'なる', + '王', '異', '世', '界', diff --git a/app/models/analyze_syntax.rb b/app/models/analyze_syntax.rb index 949b5db..b27493e 100644 --- a/app/models/analyze_syntax.rb +++ b/app/models/analyze_syntax.rb @@ -58,7 +58,7 @@ def check_words words_with_noun_and_x_tags.map { |word| remove_all_three_point_readers_from_word(word) } + words_with_noun_and_x_tags.map { |word| convert_hankaku_katakana_to_zenkaku_katakana(word) } + words_with_noun_and_x_tags.map { |word| convert_zenkaku_numbers_to_hankaku_numbers(word) } - ).uniq + ).uniq.reject(&:empty?) end # rubocop:enable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity