Skip to content

Commit

Permalink
try to fix that
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Aug 27, 2023
1 parent cc6d8ef commit 93078f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions newshomepages/analyze/drudge.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def get_lemma(headline: str):
# Read it into our NPL thing
doc = nlp(headline)

# Parse out all the words
token_list = [token.strip() for token in doc if token.strip()]
# Parse out all the words, and remove empty ones
token_list = [token for token in doc if token.text.strip()]

# Remove stop words
token_list = [t for t in token_list if not t.is_stop]
Expand Down

0 comments on commit 93078f3

Please sign in to comment.