Spaces:
Sleeping
Sleeping
Commit
·
0ddd09e
1
Parent(s):
05f3fd9
deepnote update
Browse files
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(
|
| 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:
|