Created
May 25, 2020 19:05
-
-
Save ecdedios/d185c5234246e493096a3d77d0ba51e5 to your computer and use it in GitHub Desktop.
An early attempt at using fuzzywuzzy.
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
choices = set([item for sublist in articles for item in sublist]) | |
cleaned_articles = [] | |
for article in articles: | |
article_entities = [] | |
for entity in set(article): | |
article_entities.append(process.extractOne(entity, choices)[0]) | |
cleaned_articles.append(article_entities) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment