Spaces:
Runtime error
Runtime error
Update nlp_entities.py
Browse files- nlp_entities.py +3 -0
nlp_entities.py
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
#@title NLP Entities code
|
2 |
import re
|
3 |
import spacy
|
|
|
|
|
|
|
4 |
nlp = spacy.load("en_core_web_sm")
|
5 |
nlp.add_pipe("textrank", last=True, config={"pos_kept": POS, "token_lookback": 3})
|
6 |
all_stopwords = nlp.Defaults.stop_words
|
|
|
1 |
#@title NLP Entities code
|
2 |
import re
|
3 |
import spacy
|
4 |
+
FILT_GROUPS = ["CARDINAL", "TIME", "DATE", "PERCENT", "MONEY", "QUANTITY", "ORDINAL"]
|
5 |
+
POS = ["NOUN", "PROPN", "VERB"]
|
6 |
+
|
7 |
nlp = spacy.load("en_core_web_sm")
|
8 |
nlp.add_pipe("textrank", last=True, config={"pos_kept": POS, "token_lookback": 3})
|
9 |
all_stopwords = nlp.Defaults.stop_words
|