CM2000112 / internals /util /anomaly.py
jayparmr's picture
Upload folder using huggingface_hub
0eec7f4
raw
history blame
816 Bytes
import re
__colors = [
"Amber",
"Aqua",
"Azure",
"Beige",
"Black",
"Blue",
"Bronze",
"Brown",
"Chartreuse",
"Clay",
"Clay",
"Cyan",
"Dark",
"Gainsboro",
"Golden",
"Grape",
"Green",
"Grey",
"Indigo",
"Ivory",
"Light",
"Lime",
"Magenta",
"Maroon",
"Metallic",
"Mint",
"Mistry",
"Mustard",
"Navy",
"Neon",
"Off",
"Olive",
"Orange",
"Orange",
"Pea",
"Peru",
"Pink",
"Plum",
"Purple",
"Red",
"Ruby",
"Rust",
"Silver",
"Snow",
"Teal",
"Turquoise",
"Violet",
"Wheat",
"White",
"Yellow",
]
def remove_colors(text: str) -> str:
for color in __colors:
text = re.sub(color, "", text, flags=re.I)
return text