From 67860a845ca3f1e4fb4f99b9816302d5c2152e62 Mon Sep 17 00:00:00 2001 From: BrokenEagle Date: Sun, 5 Jan 2020 22:53:44 +0000 Subject: [PATCH] Add normalization for Twitter hashtags --- app/logical/sources/strategies/twitter.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/logical/sources/strategies/twitter.rb b/app/logical/sources/strategies/twitter.rb index 879a4f722..f5722f6b7 100644 --- a/app/logical/sources/strategies/twitter.rb +++ b/app/logical/sources/strategies/twitter.rb @@ -15,6 +15,20 @@ module Sources::Strategies # https://developer.twitter.com/en/docs/developer-utilities/configuration/api-reference/get-help-configuration RESERVED_USERNAMES = %w[home i intent search] + # List of hashtag suffixes attached to tag other names + # Ex: 西住みほ生誕祭2019 should be checked as 西住みほ + # The regexes will not match if there is nothing preceding + # the pattern to avoid creating empty strings. + COMMON_TAG_REGEXES = [ + /(?