andreasmartin commited on
Commit
0ddd09e
·
1 Parent(s): 05f3fd9

deepnote update

Browse files
Files changed (1) hide show
  1. util.py +1 -1
util.py CHANGED
@@ -84,7 +84,7 @@ def duplicate_rows_with_synonyms(df: pd.DataFrame, column: str, synonyms: list[l
84
  text = row[column]
85
  for synonym_list in synonyms:
86
  for synonym in synonym_list:
87
- pattern = r'\b(?:{}|{}(?:s|es|ed|ing)?)\b'.format(synonym, synonym)
88
  if re.search(pattern, text):
89
  for replacement in synonym_list:
90
  if replacement != synonym:
 
84
  text = row[column]
85
  for synonym_list in synonyms:
86
  for synonym in synonym_list:
87
+ pattern = r'(?i)\b({}(?:s|es|ed|ing)?)\b'.format(synonym)
88
  if re.search(pattern, text):
89
  for replacement in synonym_list:
90
  if replacement != synonym: