From 7b29fb0005e9af5818ed6391fc36c370994ab72c Mon Sep 17 00:00:00 2001 From: simplypower-bbj Date: Mon, 9 Jan 2023 19:03:56 +0100 Subject: [PATCH] commented code --- code/clean_data.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/clean_data.py b/code/clean_data.py index 29504af..c151af7 100644 --- a/code/clean_data.py +++ b/code/clean_data.py @@ -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()