sdutta28 commited on
Commit
98bde00
β€’
1 Parent(s): 3c3786b

NLTK path modification

Browse files
Files changed (33) hide show
  1. components/config.py +1 -1
  2. components/utils.py +1 -1
  3. static/ntlk/corpora/stopwords.zip +0 -0
  4. static/{nltk β†’ ntlk}/corpora/stopwords/README +0 -0
  5. static/{nltk β†’ ntlk}/corpora/stopwords/arabic +0 -0
  6. static/{nltk β†’ ntlk}/corpora/stopwords/azerbaijani +0 -0
  7. static/{nltk β†’ ntlk}/corpora/stopwords/basque +0 -0
  8. static/{nltk β†’ ntlk}/corpora/stopwords/bengali +0 -0
  9. static/{nltk β†’ ntlk}/corpora/stopwords/catalan +0 -0
  10. static/{nltk β†’ ntlk}/corpora/stopwords/chinese +0 -0
  11. static/{nltk β†’ ntlk}/corpora/stopwords/danish +0 -0
  12. static/{nltk β†’ ntlk}/corpora/stopwords/dutch +0 -0
  13. static/{nltk β†’ ntlk}/corpora/stopwords/english +0 -0
  14. static/{nltk β†’ ntlk}/corpora/stopwords/finnish +0 -0
  15. static/{nltk β†’ ntlk}/corpora/stopwords/french +0 -0
  16. static/{nltk β†’ ntlk}/corpora/stopwords/german +0 -0
  17. static/{nltk β†’ ntlk}/corpora/stopwords/greek +0 -0
  18. static/{nltk β†’ ntlk}/corpora/stopwords/hebrew +0 -0
  19. static/{nltk β†’ ntlk}/corpora/stopwords/hinglish +0 -0
  20. static/{nltk β†’ ntlk}/corpora/stopwords/hungarian +0 -0
  21. static/{nltk β†’ ntlk}/corpora/stopwords/indonesian +0 -0
  22. static/{nltk β†’ ntlk}/corpora/stopwords/italian +0 -0
  23. static/{nltk β†’ ntlk}/corpora/stopwords/kazakh +0 -0
  24. static/{nltk β†’ ntlk}/corpora/stopwords/nepali +0 -0
  25. static/{nltk β†’ ntlk}/corpora/stopwords/norwegian +0 -0
  26. static/{nltk β†’ ntlk}/corpora/stopwords/portuguese +0 -0
  27. static/{nltk β†’ ntlk}/corpora/stopwords/romanian +0 -0
  28. static/{nltk β†’ ntlk}/corpora/stopwords/russian +0 -0
  29. static/{nltk β†’ ntlk}/corpora/stopwords/slovene +0 -0
  30. static/{nltk β†’ ntlk}/corpora/stopwords/spanish +0 -0
  31. static/{nltk β†’ ntlk}/corpora/stopwords/swedish +0 -0
  32. static/{nltk β†’ ntlk}/corpora/stopwords/tajik +0 -0
  33. static/{nltk β†’ ntlk}/corpora/stopwords/turkish +0 -0
components/config.py CHANGED
@@ -12,7 +12,7 @@ class Settings:
12
  0: "NGEN - Non Misogynistic Content",
13
  1: "GEN - Misogynistic Content",
14
  }
15
- NLTK_DATA_PATH = "/static/ntlk"
16
 
17
 
18
  app_config = Settings()
 
12
  0: "NGEN - Non Misogynistic Content",
13
  1: "GEN - Misogynistic Content",
14
  }
15
+ NLTK_DATA_PATH = "static/ntlk"
16
 
17
 
18
  app_config = Settings()
components/utils.py CHANGED
@@ -3,7 +3,7 @@ import nltk
3
  import re
4
  from components.config import app_config
5
 
6
- nltk.data.path.append(app_config.NLTK_DATA_PATH)
7
 
8
 
9
  # Cleans one text
 
3
  import re
4
  from components.config import app_config
5
 
6
+ nltk.download("stopwords", download_dir=app_config.NLTK_DATA_PATH)
7
 
8
 
9
  # Cleans one text
static/ntlk/corpora/stopwords.zip ADDED
Binary file (34.3 kB). View file
 
static/{nltk β†’ ntlk}/corpora/stopwords/README RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/arabic RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/azerbaijani RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/basque RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/bengali RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/catalan RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/chinese RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/danish RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/dutch RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/english RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/finnish RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/french RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/german RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/greek RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/hebrew RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/hinglish RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/hungarian RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/indonesian RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/italian RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/kazakh RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/nepali RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/norwegian RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/portuguese RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/romanian RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/russian RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/slovene RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/spanish RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/swedish RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/tajik RENAMED
File without changes
static/{nltk β†’ ntlk}/corpora/stopwords/turkish RENAMED
File without changes