[text] title_1918

Viewer

copydownloadembedprintName: title_1918
  1. data_stopwords = requests.get("https://replit.com/@ev298/OOP-202#final_project/title_1918.txt").text
  2.  
  3.  
  4. def remove_stopwords(input_string):
  5.   dict_stopwords = {}
  6.   for val in data_stopwords.split("\n"):
  7.     dict_stopwords[val.strip()] = 1
  8.  
  9.   output_string = ""
  10.   for word in input_string.lower().split():
  11.     if (word in dict_stopwords):
  12.       continue
  13.     output_string += word + " "
  14.   output_string = output_string.strip()
  15.   return output_string
  16.  

Editor

You can edit this paste and save as new:


File Description
  • title_1918
  • Paste Code
  • 27 Apr-2024
  • 462 Bytes
You can Share it: