From fad67477ddf1736e23231c7c111a0b378b273860 Mon Sep 17 00:00:00 2001 From: abhinavp13 Date: Wed, 22 Mar 2017 16:28:47 +0530 Subject: [PATCH] Update removeStopWords method It was checking for is Stopword(string), which is the method input string. After splitting on spaces, we have word in words, so isStopword should be called with word as string parameter. --- 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;