Skip to content

Commit

Permalink
Fix nltk stopwords download issue
Browse files Browse the repository at this point in the history
  • Loading branch information
schedutron committed Apr 4, 2019
1 parent 1d2421b commit 1c825a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion chirps/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import requests
from lxml.html import fromstring
import nltk # Used here to split paragraphs into sentences.
nltk.download('punkt')
from twitter import TwitterHTTPError

# tokenizer is used in scraping.
Expand Down
7 changes: 7 additions & 0 deletions chirps/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
import os
import argparse
from urllib import parse

# nltk is only used for downloading relevant files here, but it is used
# directly in other functions.py
import nltk
nltk.download('stopwords') # Used for eliminating stopwords.
nltk.download('punkt') # Used for tokenizing paragraphs.

from twitter import Twitter, OAuth, TwitterStream
# Useful boilerplate functions for the overall Twitter bot.
import chirps.functions as functions
Expand Down

0 comments on commit 1c825a4

Please sign in to comment.