Skip to content

Instantly share code, notes, and snippets.

View varunagrawal's full-sized avatar
🎯
Focusing

Varun Agrawal varunagrawal

🎯
Focusing
View GitHub Profile
@varunagrawal
varunagrawal / wishwasher_nlp.py
Last active August 29, 2015 13:56
NLP Hack for WishWasher
def bday_wish(message):
""" Analyze message to ascertain if it is a birthday wish
Params:
meassage: The message received from FB friend
"""
keywords = ["birthday", "birth", "happy", "bday", "hpy", "hbd", "hb", "happi", "best", "memorable", "awesome", "fantastic", "super", "bappy", "hirthday", "returns", "many", "bless", "god", "belated"]
expansion = {"hbd":["happy", "birthday"], "hb":["happy", "birthday"]}