mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
Move stopwords.txt to be accessable by bot developer
This commit is contained in:
@@ -14,10 +14,10 @@ module Ebooks
|
|||||||
# to be using it all of the time
|
# to be using it all of the time
|
||||||
|
|
||||||
# Lazily loads an array of stopwords
|
# Lazily loads an array of stopwords
|
||||||
# Stopwords are common English words that should often be ignored
|
# Stopwords are common words that should often be ignored
|
||||||
# @return [Array<String>]
|
# @return [Array<String>]
|
||||||
def self.stopwords
|
def self.stopwords
|
||||||
@stopwords ||= File.read(File.join(DATA_PATH, 'stopwords.txt')).split
|
@stopwords ||= File.exists?('stopwords.txt') ? File.read('stopwords.txt').split : []
|
||||||
end
|
end
|
||||||
|
|
||||||
# Lazily loads an array of known English nouns
|
# Lazily loads an array of known English nouns
|
||||||
|
|||||||
Reference in New Issue
Block a user