Merge pull request #47 from Shawn-Smith/Stopwords-lowercase

Make stopwords lowercase
This commit is contained in:
Zachary Rice authored and GitHub committed 2018-02-25 17:15:02 -06:00
commit 4b21bbef2e
2 files changed
+4 -2

No files matched your search

+3
View File
@@ -107,6 +107,9 @@ func checkShannonEntropy(target string, opts *Options) bool {
// containsStopWords checks if there are any stop words in target
func containsStopWords(target string) bool {
// Convert to lowercase to reduce the number of loops needed.
target = strings.ToLower(target)
for _, stopWord := range stopWords {
if strings.Contains(target, stopWord) {
return true