Update ATS_score.py

#1
by Joanna30 - opened
Files changed (1) hide show
  1. ATS_score.py +12 -5
ATS_score.py CHANGED
@@ -1,7 +1,6 @@
1
- from sklearn.feature_extraction.text import TfidfVectorizer
2
- from sklearn.metrics.pairwise import cosine_similarity
3
- from sklearn.feature_extraction import _stop_words
4
- from convert import ExtractPDFText
5
 
6
  def calculateATSscore(resume_data, job_description):
7
  stopwords = list(_stop_words.ENGLISH_STOP_WORDS)
@@ -17,5 +16,13 @@ def calculateATSscore(resume_data, job_description):
17
 
18
  # Return the ATS score rounded to two decimal places
19
  ats_score = round(similarity_value[0, 1], 2)
20
-
21
  return ats_score
 
 
 
 
 
 
 
 
 
 
1
+ from sklearn.feature_extraction.text import TfidfVectorizer
2
+ from sklearn.metrics.pairwise import cosine_similarity
3
+ from sklearn.feature_extraction import _stop_words
 
4
 
5
  def calculateATSscore(resume_data, job_description):
6
  stopwords = list(_stop_words.ENGLISH_STOP_WORDS)
 
16
 
17
  # Return the ATS score rounded to two decimal places
18
  ats_score = round(similarity_value[0, 1], 2)
 
19
  return ats_score
20
+
21
+ def skill_gap_analysis(resume_text, required_skills):
22
+ present_skills = [skill for skill in required_skills if skill.lower() in resume_text.lower()]
23
+ missing_skills = [skill for skill in required_skills if skill.lower() not in resume_text.lower()]
24
+
25
+ return {
26
+ "present": present_skills,
27
+ "missing": missing_skills
28
+ }