Add 'for' stopword
This commit is contained in:
parent
22bda17fa2
commit
e7c156b72a
|
@ -55,7 +55,7 @@ def titleize(string)
|
||||||
title = title.gsub(/(-|_)/, ' ')
|
title = title.gsub(/(-|_)/, ' ')
|
||||||
|
|
||||||
# Uppercase only first letter of each word, ignore stopwords
|
# 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|
|
title = title.split.map { |word|
|
||||||
if stopwords.include?(word)
|
if stopwords.include?(word)
|
||||||
word
|
word
|
||||||
|
|
Loading…
Reference in New Issue