iababio commited on
Commit
dc7ed36
1 Parent(s): 78588a0

solve nltk error

Browse files
Files changed (3) hide show
  1. Indexer.py +2 -0
  2. app.py +2 -0
  3. authorindexer.py +2 -0
Indexer.py CHANGED
@@ -44,6 +44,8 @@ pubName = ujson.loads(publication)
44
  #Downloading libraries to use its methods
45
  nltk.download('stopwords')
46
  nltk.download('punkt')
 
 
47
 
48
  #Predefined stopwords in nltk are used
49
  stop_words = stopwords.words('english')
 
44
  #Downloading libraries to use its methods
45
  nltk.download('stopwords')
46
  nltk.download('punkt')
47
+ nltk.download('all')
48
+
49
 
50
  #Predefined stopwords in nltk are used
51
  stop_words = stopwords.words('english')
app.py CHANGED
@@ -10,6 +10,8 @@ from nltk.stem import PorterStemmer
10
  import nltk
11
  nltk.download('stopwords')
12
  nltk.download('punkt')
 
 
13
 
14
 
15
  # Set up the NLTK components
 
10
  import nltk
11
  nltk.download('stopwords')
12
  nltk.download('punkt')
13
+ nltk.download('all')
14
+
15
 
16
 
17
  # Set up the NLTK components
authorindexer.py CHANGED
@@ -21,6 +21,8 @@ with open('author_names.json', 'w') as f:
21
  # Download necessary NLTK resources
22
  nltk.download('stopwords')
23
  nltk.download('punkt')
 
 
24
 
25
  # Load the JSON file containing author names
26
  with open('author_names.json', 'r') as f:
 
21
  # Download necessary NLTK resources
22
  nltk.download('stopwords')
23
  nltk.download('punkt')
24
+ nltk.download('all')
25
+
26
 
27
  # Load the JSON file containing author names
28
  with open('author_names.json', 'r') as f: