Spaces:
Sleeping
Sleeping
Update utils/suggestions.py
Browse files- utils/suggestions.py +17 -0
utils/suggestions.py
CHANGED
|
@@ -75,3 +75,20 @@ def get_job_listings(cv_text):
|
|
| 75 |
|
| 76 |
raise KeyError("CSV file must have either 'listing' or 'suggestion' column.")
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
raise KeyError("CSV file must have either 'listing' or 'suggestion' column.")
|
| 77 |
|
| 78 |
+
def identify_field(cv_text):
|
| 79 |
+
# A basic mock-up: you should replace this with actual NLP/ML logic
|
| 80 |
+
lower_text = cv_text.lower()
|
| 81 |
+
if "python" in lower_text or "software" in lower_text or "developer" in lower_text:
|
| 82 |
+
return "Software Development"
|
| 83 |
+
elif "accounting" in lower_text or "finance" in lower_text:
|
| 84 |
+
return "Accounting"
|
| 85 |
+
elif "nurse" in lower_text or "clinical" in lower_text:
|
| 86 |
+
return "Nursing"
|
| 87 |
+
elif "biology" in lower_text:
|
| 88 |
+
return "Biology"
|
| 89 |
+
elif "marketing" in lower_text:
|
| 90 |
+
return "Marketing"
|
| 91 |
+
else:
|
| 92 |
+
return "General"
|
| 93 |
+
|
| 94 |
+
|