Add in-place role-fix for existing «پزشک عمومی»-mislabeled listings
RecorrectDoctorRolesAsync (+ admin button «اصلاح نقش»): re-runs the keyword parser + doctor-role guard over the stored text of existing aggregated listings currently labeled «پزشک عمومی», and corrects RoleId + the generic title in place when the text actually names a more specific role (dentist, «متخصص», lab, …). No AI call, no delete/recreate — IDs and indexed URLs unchanged, only GP-labeled rows touched. Cleans up the dentist/ENT/«متخصص غدد» mislabels already published. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,15 @@
|
||||
🏥 ادغام مراکز تکراری و حذف مراکز بینام
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form method="post">
|
||||
<button type="submit" asp-page-handler="RecorrectRoles" class="btn btn-primary btn-block" style="margin-top:10px;">
|
||||
🩺 اصلاح نقشِ آگهیهای «پزشک عمومی» (دندانپزشک/متخصص و …)
|
||||
</button>
|
||||
</form>
|
||||
<p class="muted" style="font-size:11px; margin:6px 0 0;">
|
||||
آگهیهایی که هوش مصنوعی به اشتباه «پزشک عمومی» زده ولی متنشان نقش دیگری دارد، از روی متن اصلاح میشوند (درجا، بدون تغییر شناسه/آدرس).
|
||||
</p>
|
||||
<p class="muted" style="font-size:11px; margin:6px 0 0;">
|
||||
مراکز تکراری (با تطبیقِ فارسی) در یک رکورد ادغام و مراکزِ بدونِ نامِ واقعی به «نامشخص» منتقل میشوند. آگهیها حفظ میشوند؛ فقط مراکزِ جمعآوریشده و مدیریتنشده پاک میشوند.
|
||||
</p>
|
||||
|
||||
@@ -157,6 +157,15 @@ public class IndexModel : PageModel
|
||||
return RedirectToPage();
|
||||
}
|
||||
|
||||
/// <summary>Fix existing aggregated listings the AI mislabeled «پزشک عمومی» (dentist/specialist/…)
|
||||
/// in place from their stored text — no AI, no ID/URL change.</summary>
|
||||
public async Task<IActionResult> OnPostRecorrectRolesAsync()
|
||||
{
|
||||
var n = await _ingest.RecorrectDoctorRolesAsync();
|
||||
IngestMessage = $"اصلاح نقش: {n} آگهیِ «پزشک عمومی» که در واقع نقش دیگری بود (دندانپزشک، متخصص و …) از روی متن آگهی اصلاح شد. بدون تغییر شناسه یا آدرس صفحه.";
|
||||
return RedirectToPage();
|
||||
}
|
||||
|
||||
private async Task LoadAsync()
|
||||
{
|
||||
Queue = await _db.RawListings
|
||||
|
||||
Reference in New Issue
Block a user