vives commited on
Commit
b5bc1cb
·
1 Parent(s): a89cb28

Update nlp_entities.py

Browse files
Files changed (1) hide show
  1. nlp_entities.py +5 -0
nlp_entities.py CHANGED
@@ -1,5 +1,10 @@
1
  #@title NLP Entities code
2
  import re
 
 
 
 
 
3
  def er_data_cleaning(raw: str) -> str:
4
  """
5
  Strip off text for html tags and characters.
 
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
7
+
8
  def er_data_cleaning(raw: str) -> str:
9
  """
10
  Strip off text for html tags and characters.