# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     name: python3
# ---

# + id="qHTNhOayUJsj" colab_type="code" colab={}
import re
def clean_words(text):
  text = re.sub("(<.*?>)","",text)
  text=re.sub("(\W|\d+)"," ",text)
  text=text.strip()
  
  return text


# + id="JVIGcTNeU_h0" colab_type="code" colab={}
raw = ['..sleepy', 'sleepy!!', '#sleepy', '>>>>>sleepy>>>>', '<a>sleepy</a>']

# + id="hhp9G6bPVCE7" colab_type="code" colab={"base_uri": "https://localhost:8080/", "height": 34} outputId="ee24db54-f05b-484a-f163-daa8e24be88d"
clean = [clean_words(r) for r in raw]
print(clean)

StarcoderdataJupyterScriptsDedupFiltered