simple-h / score.py
a686d380's picture
Create score.py
386dc73 verified
raw
history blame
167 Bytes
def hscore(text):
cnt = 0
for i in range(len(text)):
if text[i:i+1] in keywords or text[i:i+2] in keywords:
cnt+=1
return cnt/len(text)