From b3e7123d74daa3a745953163f9d251021862568e Mon Sep 17 00:00:00 2001
From: "soroush.asadi"
Date: Mon, 22 Jun 2026 17:21:32 +0330
Subject: [PATCH] =?UTF-8?q?Extract=20Iranian=20salary=20shorthand=20(X=20?=
=?UTF-8?q?=D8=AA=D9=88=D9=85=D8=A7=D9=86=20=3D=20millions)=20+=20pay=20ba?=
=?UTF-8?q?ckfill?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Parser: most jobs read «توافقی» because the amount extractor only saw 6–10 digit numbers, missing
the way Iranian ads actually state pay — «۱۵ تومان»، «۴۰ تا ۵۰ تومان»، «۲۰ میلیون»، «۲۰م» all mean
MILLIONS of toman. Add colloquial detection (1–3 digit number + تومان/م/میلیون → ×1,000,000, lower
bound of a range), guarded so it never matches dates/hours or a long literal-toman figure. Also: a
stated amount now wins over «توافقی» (ads often say a number AND «… بقیه توافقی»).
Backfill: BackfillPayAsync re-parses existing aggregated jobs/talent that have no salary and fills
it in place (no AI, no ID/URL change) — wired into the post-ingest auto-cleanup and exposed as an
admin button. Existing «توافقی» listings with a stated number get their salary; genuinely-negotiable
ads stay توافقی. Also improves the baseSalary in JobPosting rich results.
Co-Authored-By: Claude Opus 4.8
---
src/JobsMedical.Web/Pages/Admin/Index.cshtml | 9 +++++
.../Pages/Admin/Index.cshtml.cs | 9 +++++
src/JobsMedical.Web/Services/ListingParser.cs | 21 +++++++----
.../Services/Scraping/IngestionService.cs | 37 ++++++++++++++++++-
4 files changed, 67 insertions(+), 9 deletions(-)
diff --git a/src/JobsMedical.Web/Pages/Admin/Index.cshtml b/src/JobsMedical.Web/Pages/Admin/Index.cshtml
index fb804cf..fd9f8a1 100644
--- a/src/JobsMedical.Web/Pages/Admin/Index.cshtml
+++ b/src/JobsMedical.Web/Pages/Admin/Index.cshtml
@@ -67,6 +67,15 @@
شیفت/استخدام/آمادهبهکارِ جمعآوریشدهای که مختصات ندارند، از روی محلهٔ ذکرشده در متنِ آگهی روی نقشه قرار میگیرند (محدودهٔ تقریبی). فقط مختصاتِ خالی پر میشود؛ موقعیتِ واقعیِ مراکز دستنخورده میماند.
+
+
+ آگهیهایی که حقوقشان «توافقی» است ولی در متن مبلغ دارند (مثل «۴۰ تا ۵۰ تومان» = میلیون)، مبلغشان استخراج و ثبت میشود (درجا، بدون تغییر شناسه/آدرس).
+
+