Strip «آماده به کار» from role names + reject domestic-helper ads
CI/CD / CI · dotnet build (push) Successful in 2m3s
CI/CD / Deploy · hamkadr (push) Successful in 3m14s

Re-check of live applicants found two gaps:
- «کمک بهیار آماده به کار» — the availability phrase glued onto the role. StripRoleModifiers
  now removes «آماده به کار / آماده همکاری / جویای کار / جهت همکاری» phrases before
  token-stripping, so the role collapses to «کمک بهیار».
- «خانم امورسبک منزل» — light-housework domestic helpers (not کادر درمان). Validator
  now discards ads with «امور منزل / نظافت منزل / خدمتکار / مستخدم …» markers.

Both take effect for existing data on the next applicant reprocess.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-20 19:58:06 +03:30
parent 7e17e7ccb3
commit baa617daa9
2 changed files with 25 additions and 3 deletions
@@ -39,6 +39,14 @@ public class ListingValidator
"بوتاکس و فیلر", "مزوتراپی", "فیلر صورت",
};
// Domestic-helper ads (housekeeping/cleaning/servant) — not کادر درمان, even when they also
// mention سالمند/نگهداری. The «امور منزل / نظافت» phrasing is the giveaway.
private static readonly string[] DomesticMarkers =
{
"امور منزل", "امور سبک منزل", "امورسبک منزل", "کارهای منزل", "کار منزل", "نظافت منزل",
"نظافتچی", "خدمتکار", "کارگر منزل", "خدمات منزل", "مستخدم",
};
// Words that signal a real staffing post (hiring, shift, or availability).
private static readonly string[] StaffingIntent =
{
@@ -67,6 +75,13 @@ public class ListingValidator
return new ValidationResult(false, true, 0, issues, looksMedical); // IsSpam → auto-discard
}
// Domestic-helper / housekeeping ads — out of scope (not کادر درمان), discard.
if (DomesticMarkers.Any(text.Contains))
{
issues.Add("آگهی خدماتِ منزل/نظافت است، نه کادر درمان");
return new ValidationResult(false, true, 0, issues, looksMedical); // IsSpam → auto-discard
}
// «آماده به کار»: a worker offering themselves. No facility/shift-date expected; the role
// and a contact number are what matter.
if (parsed.Kind == ListingKind.Talent)