marcelomoreno26 commited on
Commit
22ec789
1 Parent(s): 499fb92

Update preprocessor.py

Browse files
Files changed (1) hide show
  1. preprocessor.py +0 -1
preprocessor.py CHANGED
@@ -62,7 +62,6 @@ def preprocess_whatsapp_messages(file_path, file_type):
62
  # Additional preprocessing steps:
63
  # Remove URLs and convert text to lowercase
64
  df['text'] = df['text'].apply(lambda x: re.sub(r'https?:\/\/\S+', '', x)) # Remove URLs
65
- df['text'] = df['text'].apply(lambda x: x.lower()) # Convert text to lowercase
66
 
67
  # Remove emojis, images, stickers, documents while preserving colons after sender names
68
  df['text'] = df['text'].apply(lambda x: re.sub(r'(?<!\w)(:\s|\s:\s|\s:)', '', x)) # Remove colons that are not part of sender's name
 
62
  # Additional preprocessing steps:
63
  # Remove URLs and convert text to lowercase
64
  df['text'] = df['text'].apply(lambda x: re.sub(r'https?:\/\/\S+', '', x)) # Remove URLs
 
65
 
66
  # Remove emojis, images, stickers, documents while preserving colons after sender names
67
  df['text'] = df['text'].apply(lambda x: re.sub(r'(?<!\w)(:\s|\s:\s|\s:)', '', x)) # Remove colons that are not part of sender's name