smart_interview_analyser / keyword_analysis.py
asmithaaa's picture
Upload 40 files
438c749 verified
raw
history blame contribute delete
390 Bytes
def keyword_score(text):
keywords = [
"python",
"programming",
"language",
"data",
"development",
"software",
"presentation",
"candidate",
"author"
]
text = text.lower()
count = sum(1 for word in keywords if word in text)
score = (count / len(keywords)) * 100
return round(score, 2), count