Skip to content

Commit ccf9243

Browse files
author
ycaty
authored
Create bio-splicer.py
0 parents  commit ccf9243

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

bio-splicer.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -*- coding: utf-8 -*-
2+
#!/usr/bin/env python
3+
import re
4+
5+
bio="""❤️ 🧡 💛 💚 💙 ggnore 💜 🖤 🤍 🤎 💔 ❣️ 💕 💞 💓 💗 💖 💘 💝
6+
💟 ☮️ ✝️cake ☪️ 🕉 ☸️ ✡️ 🔯 🕎 ☯️ ☦️ 🛐 ⛎ ♈️ ♉️ ♊️ ♋️ ♌️ ♍️ ♎️ ♏️ ♐️ ♑️ ♒️ ♓ rawr️ 🆔 ⚛️
7+
🉑 ☢️ ☣️ 📴 📳 🈶 🈚 loot️ 🈸 🈺 🈷️ ✴️ 🆚 💮 🉐 ㊙️ ㊗️ 🈴 🈵 🈹 🈲 🅰️ 🅱️ 🆎 🆑 🅾️ 🆘
8+
❌ ⭕️ 🛑 ⛔️ 📛 🚫 💯 💢 ♨️ 🚷 🚯 🚳 🚱 🔞 📵 🚭 ❗️ ❕ ❓ ❔ ‼️ ⁉️ 🔅 🔆 〽️
9+
⚠️ 🚸 🔱 ⚜️ 🔰 ♻️ ✅ 🈯️ 💹 ❇️ ✳️ ❎ 🌐 💠 Ⓜ️ 🌀 💤 🏧"""
10+
11+
def bioSplicer(bio):
12+
'''
13+
Returns List ['hello','world']
14+
Removes unicode/junk text
15+
returns list of all words found in lowercase
16+
used for testing keyword/negative keyword search
17+
'''
18+
19+
regex = r'\b\w+\b'
20+
return [x.lower() for x in re.findall(regex,bio)]
21+
22+
keywords = bioSplicer(bio)
23+
print keywords
24+

0 commit comments

Comments
 (0)