Spaces:
Running
Running
merge skills
Browse files- services/processor_utils.py +37 -1
services/processor_utils.py
CHANGED
|
@@ -2506,6 +2506,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2506 |
"cashier",
|
| 2507 |
"receptionist",
|
| 2508 |
"clerk",
|
|
|
|
| 2509 |
],
|
| 2510 |
"Software Engineering": [
|
| 2511 |
"developer",
|
|
@@ -2528,6 +2529,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2528 |
"sysadmin",
|
| 2529 |
"it administrator",
|
| 2530 |
"cloud engineer",
|
|
|
|
| 2531 |
],
|
| 2532 |
"Cybersecurity": [
|
| 2533 |
"security",
|
|
@@ -2537,6 +2539,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2537 |
"soc analyst",
|
| 2538 |
"penetration tester",
|
| 2539 |
"ethical hacker",
|
|
|
|
| 2540 |
],
|
| 2541 |
"Design & Creative": [
|
| 2542 |
"designer",
|
|
@@ -2547,6 +2550,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2547 |
"visual",
|
| 2548 |
"illustrator",
|
| 2549 |
"photographer",
|
|
|
|
| 2550 |
],
|
| 2551 |
"Marketing & Growth": [
|
| 2552 |
"marketing",
|
|
@@ -2556,6 +2560,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2556 |
"growth",
|
| 2557 |
"digital",
|
| 2558 |
"brand",
|
|
|
|
| 2559 |
],
|
| 2560 |
"Data & Analytics": [
|
| 2561 |
"data analyst",
|
|
@@ -2572,6 +2577,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2572 |
"data pipeline",
|
| 2573 |
"data architect",
|
| 2574 |
"analytics engineer",
|
|
|
|
| 2575 |
],
|
| 2576 |
"Finance & Accounting": [
|
| 2577 |
"accountant",
|
|
@@ -2599,6 +2605,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2599 |
"account manager",
|
| 2600 |
"sales executive",
|
| 2601 |
"representative",
|
|
|
|
| 2602 |
],
|
| 2603 |
"Healthcare": [
|
| 2604 |
"nurse",
|
|
@@ -2610,6 +2617,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2610 |
"health",
|
| 2611 |
"therapist",
|
| 2612 |
"midwife",
|
|
|
|
| 2613 |
],
|
| 2614 |
"Legal": [
|
| 2615 |
"legal",
|
|
@@ -2638,6 +2646,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2638 |
"fleet",
|
| 2639 |
"warehouse manager",
|
| 2640 |
"quality",
|
|
|
|
| 2641 |
],
|
| 2642 |
"Customer Support": [
|
| 2643 |
"customer support",
|
|
@@ -2645,6 +2654,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2645 |
"call centre",
|
| 2646 |
"contact centre",
|
| 2647 |
"customer care",
|
|
|
|
| 2648 |
],
|
| 2649 |
"Construction & Engineering": [
|
| 2650 |
"civil",
|
|
@@ -2654,6 +2664,7 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2654 |
"quantity surveyor",
|
| 2655 |
"site engineer",
|
| 2656 |
"construction",
|
|
|
|
| 2657 |
],
|
| 2658 |
"Hospitality & Property": [
|
| 2659 |
"hotel",
|
|
@@ -2663,9 +2674,31 @@ _CATEGORY_TITLE_KEYWORDS: Dict[str, List[str]] = {
|
|
| 2663 |
"housekeeping",
|
| 2664 |
"f&b",
|
| 2665 |
"restaurant",
|
|
|
|
| 2666 |
],
|
| 2667 |
}
|
| 2668 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2669 |
|
| 2670 |
def _infer_category(
|
| 2671 |
text: str,
|
|
@@ -2676,7 +2709,10 @@ def _infer_category(
|
|
| 2676 |
category_skills = DEFAULT_CATEGORY_SKILLS
|
| 2677 |
text_norm = _normalize(text)
|
| 2678 |
best, best_score = "Other", 0.0
|
| 2679 |
-
for cat
|
|
|
|
|
|
|
|
|
|
| 2680 |
skill_overlap = len(skills & cat_skills)
|
| 2681 |
kw_hits = sum(
|
| 2682 |
1 for kw in _CATEGORY_TITLE_KEYWORDS.get(cat, []) if kw in text_norm
|
|
|
|
| 2506 |
"cashier",
|
| 2507 |
"receptionist",
|
| 2508 |
"clerk",
|
| 2509 |
+
"secretary",
|
| 2510 |
],
|
| 2511 |
"Software Engineering": [
|
| 2512 |
"developer",
|
|
|
|
| 2529 |
"sysadmin",
|
| 2530 |
"it administrator",
|
| 2531 |
"cloud engineer",
|
| 2532 |
+
"platform engineer",
|
| 2533 |
],
|
| 2534 |
"Cybersecurity": [
|
| 2535 |
"security",
|
|
|
|
| 2539 |
"soc analyst",
|
| 2540 |
"penetration tester",
|
| 2541 |
"ethical hacker",
|
| 2542 |
+
"information security",
|
| 2543 |
],
|
| 2544 |
"Design & Creative": [
|
| 2545 |
"designer",
|
|
|
|
| 2550 |
"visual",
|
| 2551 |
"illustrator",
|
| 2552 |
"photographer",
|
| 2553 |
+
"art director",
|
| 2554 |
],
|
| 2555 |
"Marketing & Growth": [
|
| 2556 |
"marketing",
|
|
|
|
| 2560 |
"growth",
|
| 2561 |
"digital",
|
| 2562 |
"brand",
|
| 2563 |
+
"communications",
|
| 2564 |
],
|
| 2565 |
"Data & Analytics": [
|
| 2566 |
"data analyst",
|
|
|
|
| 2577 |
"data pipeline",
|
| 2578 |
"data architect",
|
| 2579 |
"analytics engineer",
|
| 2580 |
+
"data platform",
|
| 2581 |
],
|
| 2582 |
"Finance & Accounting": [
|
| 2583 |
"accountant",
|
|
|
|
| 2605 |
"account manager",
|
| 2606 |
"sales executive",
|
| 2607 |
"representative",
|
| 2608 |
+
"business dev",
|
| 2609 |
],
|
| 2610 |
"Healthcare": [
|
| 2611 |
"nurse",
|
|
|
|
| 2617 |
"health",
|
| 2618 |
"therapist",
|
| 2619 |
"midwife",
|
| 2620 |
+
"radiographer",
|
| 2621 |
],
|
| 2622 |
"Legal": [
|
| 2623 |
"legal",
|
|
|
|
| 2646 |
"fleet",
|
| 2647 |
"warehouse manager",
|
| 2648 |
"quality",
|
| 2649 |
+
"planner",
|
| 2650 |
],
|
| 2651 |
"Customer Support": [
|
| 2652 |
"customer support",
|
|
|
|
| 2654 |
"call centre",
|
| 2655 |
"contact centre",
|
| 2656 |
"customer care",
|
| 2657 |
+
"service desk",
|
| 2658 |
],
|
| 2659 |
"Construction & Engineering": [
|
| 2660 |
"civil",
|
|
|
|
| 2664 |
"quantity surveyor",
|
| 2665 |
"site engineer",
|
| 2666 |
"construction",
|
| 2667 |
+
"autocad",
|
| 2668 |
],
|
| 2669 |
"Hospitality & Property": [
|
| 2670 |
"hotel",
|
|
|
|
| 2674 |
"housekeeping",
|
| 2675 |
"f&b",
|
| 2676 |
"restaurant",
|
| 2677 |
+
"events",
|
| 2678 |
],
|
| 2679 |
}
|
| 2680 |
|
| 2681 |
+
_CATEGORY_ORDER = (
|
| 2682 |
+
"Admin & Office",
|
| 2683 |
+
"Construction & Engineering",
|
| 2684 |
+
"Customer Support",
|
| 2685 |
+
"Cybersecurity",
|
| 2686 |
+
"Data & Analytics",
|
| 2687 |
+
"Data Engineering",
|
| 2688 |
+
"Design & Creative",
|
| 2689 |
+
"Education & Training",
|
| 2690 |
+
"Finance & Accounting",
|
| 2691 |
+
"Healthcare",
|
| 2692 |
+
"Hospitality & Property",
|
| 2693 |
+
"Human Resources",
|
| 2694 |
+
"Infrastructure & Cloud",
|
| 2695 |
+
"Legal",
|
| 2696 |
+
"Marketing & Growth",
|
| 2697 |
+
"Operations & Logistics",
|
| 2698 |
+
"Sales & Business Dev",
|
| 2699 |
+
"Software Engineering",
|
| 2700 |
+
)
|
| 2701 |
+
|
| 2702 |
|
| 2703 |
def _infer_category(
|
| 2704 |
text: str,
|
|
|
|
| 2709 |
category_skills = DEFAULT_CATEGORY_SKILLS
|
| 2710 |
text_norm = _normalize(text)
|
| 2711 |
best, best_score = "Other", 0.0
|
| 2712 |
+
category_order = [cat for cat in _CATEGORY_ORDER if cat in category_skills]
|
| 2713 |
+
category_order.extend(cat for cat in category_skills if cat not in _CATEGORY_ORDER)
|
| 2714 |
+
for cat in category_order:
|
| 2715 |
+
cat_skills = category_skills[cat]
|
| 2716 |
skill_overlap = len(skills & cat_skills)
|
| 2717 |
kw_hits = sum(
|
| 2718 |
1 for kw in _CATEGORY_TITLE_KEYWORDS.get(cat, []) if kw in text_norm
|