Docker Base Image Begin
This commit is contained in:
12
docker/init.py
Normal file
12
docker/init.py
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import nltk, os
|
||||
|
||||
def init_nltk():
|
||||
nltk.download('punkt', download_dir=os.getenv('NLTK_DATA')) # used for tokenize
|
||||
nltk.download('stopwords', download_dir=os.getenv('NLTK_DATA')) # used for stopwords list
|
||||
nltk.download('wordnet', download_dir=os.getenv('NLTK_DATA')) # used for wordnet mapping
|
||||
nltk.download('omw-1.4', download_dir=os.getenv('NLTK_DATA')) # used for wordnet mapping
|
||||
|
||||
if __name__ == "__main__":
|
||||
init_nltk();
|
||||
Reference in New Issue
Block a user