Skip to content

Instantly share code, notes, and snippets.

@milindjagre
Created December 17, 2018 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milindjagre/d27f5b79f1ca1d405c0145e5053bd17a to your computer and use it in GitHub Desktop.
Save milindjagre/d27f5b79f1ca1d405c0145e5053bd17a to your computer and use it in GitHub Desktop.
This method returns a list with all the STOP WORDS.
public static List<String> getStopWords() throws IOException {
List<String> outputList = new ArrayList<String>();
BufferedReader br = new BufferedReader(new FileReader(
"C:\\nlp_en_stop_words.txt"));
String line = null;
while ((line = br.readLine()) != null) {
outputList.add(line);
}
br.close();
return outputList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment