Spaces:
Sleeping
Sleeping
Commit ·
4dc3f49
1
Parent(s): 300ace4
Update src/utils.py
Browse files- src/utils.py +3 -3
src/utils.py
CHANGED
|
@@ -6,14 +6,14 @@ from sklearn.metrics.pairwise import cosine_similarity
|
|
| 6 |
import pandas as pd
|
| 7 |
import numpy as np
|
| 8 |
|
| 9 |
-
from IPython.display import clear_output
|
| 10 |
|
| 11 |
import spacy
|
| 12 |
from spacy.tokens import DocBin
|
| 13 |
from spacy.training import offsets_to_biluo_tags
|
| 14 |
import en_fetch_ner_spacy_tsf
|
| 15 |
nlp = en_fetch_ner_spacy_tsf.load()
|
| 16 |
-
clear_output()
|
| 17 |
|
| 18 |
import nltk
|
| 19 |
nltk.download('stopwords')
|
|
@@ -22,7 +22,7 @@ from nltk.corpus import stopwords
|
|
| 22 |
stop_words = set(stopwords.words('english'))
|
| 23 |
additional_stop_words = {'pack'}
|
| 24 |
stop_words.update(additional_stop_words)
|
| 25 |
-
clear_output()
|
| 26 |
|
| 27 |
|
| 28 |
def single_text_cleaner(text: str, remove_stopwords: bool=False, upper_case: bool = False, remove_punctuation: bool=True) -> str:
|
|
|
|
| 6 |
import pandas as pd
|
| 7 |
import numpy as np
|
| 8 |
|
| 9 |
+
# from IPython.display import clear_output
|
| 10 |
|
| 11 |
import spacy
|
| 12 |
from spacy.tokens import DocBin
|
| 13 |
from spacy.training import offsets_to_biluo_tags
|
| 14 |
import en_fetch_ner_spacy_tsf
|
| 15 |
nlp = en_fetch_ner_spacy_tsf.load()
|
| 16 |
+
# clear_output()
|
| 17 |
|
| 18 |
import nltk
|
| 19 |
nltk.download('stopwords')
|
|
|
|
| 22 |
stop_words = set(stopwords.words('english'))
|
| 23 |
additional_stop_words = {'pack'}
|
| 24 |
stop_words.update(additional_stop_words)
|
| 25 |
+
# clear_output()
|
| 26 |
|
| 27 |
|
| 28 |
def single_text_cleaner(text: str, remove_stopwords: bool=False, upper_case: bool = False, remove_punctuation: bool=True) -> str:
|