commented code
This commit is contained in:
+4
-3
@@ -1,12 +1,13 @@
|
||||
# public packages
|
||||
from cleantext import clean
|
||||
|
||||
def clean_content(text):
|
||||
return clean(text, to_ascii=False)
|
||||
return clean(text, to_ascii=False) # avoid ascii, as it does not have æ,ø,å
|
||||
|
||||
def clean_content_df(df):
|
||||
content_clean = df['content'].apply(clean_content).to_list()
|
||||
content_clean_list = df['content'].apply(clean_content).to_list()
|
||||
id_list = df['id'].to_list()
|
||||
return content_clean, id_list
|
||||
return content_clean_list, id_list
|
||||
|
||||
def clean_content_en(text_list):
|
||||
text_list_clean = list()
|
||||
|
||||
Reference in New Issue
Block a user