From 39dd49d880745383871d878f63eb9fec7b63a037 Mon Sep 17 00:00:00 2001 From: YouROK <8YouROK8@mail.ru> Date: Mon, 6 Feb 2023 22:45:22 +0300 Subject: [PATCH] remove some stop words --- server/rutor/torrsearch/filter.go | 41 ++++--------------------------- 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/server/rutor/torrsearch/filter.go b/server/rutor/torrsearch/filter.go index c9f30fb..4d66417 100644 --- a/server/rutor/torrsearch/filter.go +++ b/server/rutor/torrsearch/filter.go @@ -57,42 +57,11 @@ func replaceChars(word string) string { func isStopWord(word string) bool { switch word { - case "a", "about", "above", "after", "again", "against", "all", "am", "an", - "and", "any", "are", "as", "at", "be", "because", "been", "before", - "being", "below", "between", "both", "but", "by", "can", "did", "do", - "does", "doing", "don", "down", "during", "each", "few", "for", "from", - "further", "had", "has", "have", "having", "he", "her", "here", "hers", - "herself", "him", "himself", "his", "how", "i", "if", "in", "into", "is", - "it", "its", "itself", "just", "me", "more", "most", "my", "myself", - "no", "nor", "not", "now", "of", "off", "on", "once", "only", "or", - "other", "our", "ours", "ourselves", "out", "over", "own", "s", "same", - "she", "should", "so", "some", "such", "t", "than", "that", "the", "their", - "theirs", "them", "themselves", "then", "there", "these", "they", - "this", "those", "through", "to", "too", "under", "until", "up", - "very", "was", "we", "were", "what", "when", "where", "which", "while", - "who", "whom", "why", "will", "with", "you", "your", "yours", "yourself", - "yourselves", "и", "в", "во", "не", "что", "он", "на", "я", "с", - "со", "как", "а", "то", "все", "она", "так", "его", - "но", "да", "ты", "к", "у", "же", "вы", "за", "бы", - "по", "только", "ее", "мне", "было", "вот", "от", - "меня", "еще", "нет", "о", "из", "ему", "теперь", - "когда", "даже", "ну", "вдруг", "ли", "если", "уже", - "или", "ни", "быть", "был", "него", "до", "вас", - "нибудь", "опять", "уж", "вам", "ведь", "там", "потом", - "себя", "ничего", "ей", "может", "они", "тут", "где", - "есть", "надо", "ней", "для", "мы", "тебя", "их", - "чем", "была", "сам", "чтоб", "без", "будто", "чего", - "раз", "тоже", "себе", "под", "будет", "ж", "тогда", - "кто", "этот", "того", "потому", "этого", "какой", - "совсем", "ним", "здесь", "этом", "один", "почти", - "мой", "тем", "чтобы", "нее", "сейчас", "были", "куда", - "зачем", "всех", "никогда", "можно", "при", "наконец", - "два", "об", "другой", "хоть", "после", "над", "больше", - "тот", "через", "эти", "нас", "про", "всего", "них", - "какая", "много", "разве", "три", "эту", "моя", - "впрочем", "хорошо", "свою", "этой", "перед", "иногда", - "лучше", "чуть", "том", "нельзя", "такой", "им", "более", - "всегда", "конечно", "всю", "между": + case "a", "am", "an", "and", "are", "as", "at", "be", + "by", "did", "do", "is", "of", "or", "s", "so", "t", + "и", "в", "с", "со", "а", "но", "к", "у", + "же", "бы", "по", "от", "о", "из", "ну", + "ли", "ни", "нибудь", "уж", "ведь", "ж", "об": return true } return false