-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPEN 2790, 2902: Remove temporary CSV loading fix and add support for…
… NLTK feature
- Loading branch information
Showing
6 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Install the NLTK Stopworks and Punkt tokenizer here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from django.core.management.base import BaseCommand | ||
from django.conf import settings | ||
import logging | ||
import nltk | ||
|
||
|
||
class Command(BaseCommand): | ||
help = 'Download the NLTK Stopwords and punkt tokenizer to a project folder' | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
def handle(self, *args, **options): | ||
|
||
try: | ||
nltk.download('stopwords',download_dir=settings.NLTK_DATADIR) | ||
nltk.download('punkt', download_dir=settings.NLTK_DATADIR) | ||
except Exception as x: | ||
self.logger.error(x) |