Skip to content

Commit

Permalink
Removed numbers and email highlighting for now since it causes issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fexfl committed Dec 23, 2024
1 parent aad8d5f commit dabc13c
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions notebook/batching_performance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,6 @@
" # replace entities with highlighted spans\n",
" for entity, color in entities:\n",
" text = text.replace(entity, f\"<span style=\\\"background-color:{color}\\\">{entity}</span>\")\n",
" \n",
" # highlight numbers\n",
" text_as_list = list(text)\n",
" new_list_nr = []\n",
" for char in text_as_list:\n",
" if char.isdigit():\n",
" new_list_nr.append(f\"<span style=\\\"background-color:purple\\\">{char}</span>\")\n",
" else:\n",
" new_list_nr.append(char)\n",
" text = \"\".join(new_list_nr)\n",
"\n",
" # highlight emails\n",
" split = text.split(\" \")\n",
" new_list_mail = []\n",
" for word in split:\n",
" if \"@\" in word:\n",
" new_list_mail.append(f\"<span style=\\\"background-color:cornflowerblue\\\">{word}</span>\")\n",
" else:\n",
" new_list_mail.append(word)\n",
" text = \" \".join(new_list_mail)\n",
"\n",
" return text"
]
Expand Down

0 comments on commit dabc13c

Please sign in to comment.