Last active
April 18, 2020 19:57
-
-
Save luisfredgs/16c1154f969f9b012123ac1d85a3dd35 to your computer and use it in GitHub Desktop.
Extractive text summarization spacy
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
import spacy | |
from spacy.lang.pt.stop_words import STOP_WORDS | |
from sklearn.feature_extraction.text import CountVectorizer | |
import pt_core_news_sm | |
nlp = pt_core_news_sm.load() | |
with open("original_text.txt", "r", encoding="utf-8") as f: | |
text = " ".join(f.readlines()) | |
doc = nlp(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment