def scoreThree(x, y, z): x = x.lower() + "_" + y.lower() + "_" + z.lower() try: if abs(float(word(x).polarity_value())) > .3: return float(word(x).polarity_value()) return 0 except: return 0
def scoreOne(x): x = x.lower() try: if abs(float(word(x).polarity_value())) > .3: return float(word(x).polarity_value()) return 0 except: return 0
def scoreFour(x,y,z,a): x=x.lower()+"_"+y.lower()+"_"+z.lower()+"_"+a.lower() try: return float(word(x).polarity_value()) except: return 0
def scoreTwo(x,y): x=x.lower()+"_"+y.lower() try: return float(word(x).polarity_value()) except: return 0
def hashtags(inp): tags = [] for i in inp: try: w = word(i) tags.append(w.primary_mood()) except: pass return tags
def scoreOne(x): x=x.lower() try: return float(word(x).polarity_value()) except: return 0