From 57de40b191cde9078a107ab36e77fa2d5f42a13d Mon Sep 17 00:00:00 2001 From: Dillon Date: Mon, 26 Feb 2018 20:44:06 -0500 Subject: [PATCH] Change "string" to "word" This change is necessary for the code to work because you are passing in the sentence string and not the individual word that was parsed from the sentence. --- util/Stopwords.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/Stopwords.java b/util/Stopwords.java index 4c21e22..e9c7247 100644 --- a/util/Stopwords.java +++ b/util/Stopwords.java @@ -36,7 +36,7 @@ public static String removeStopWords(String string) { String[] words = string.split("\\s+"); for(String word : words) { if(word.isEmpty()) continue; - if(isStopword(string)) continue; //remove stopwords + if(isStopword(word)) continue; //remove stopwords result += (word+" "); } return result;