Add 'for' stopword

This commit is contained in:
Blerim Sheqa 2021-09-10 11:44:10 +02:00
parent 22bda17fa2
commit e7c156b72a
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ def titleize(string)
title = title.gsub(/(-|_)/, ' ')
# Uppercase only first letter of each word, ignore stopwords
stopwords = ['and', 'or', 'to', 'by', 'on', 'with', 'is', 'at', 'of', 'from']
stopwords = ['and', 'or', 'to', 'by', 'on', 'with', 'is', 'at', 'of', 'from', 'for']
title = title.split.map { |word|
if stopwords.include?(word)
word