From 6674d0e3e1309c99d462518056e2c01a58be9805 Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Tue, 7 Jul 2026 10:26:00 +0000 Subject: [PATCH] fix(sugestii): inlocuirea de anvelope -> OE-8 + vot k-NN ponderat pe rang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seed-ul Haiku eticheta sistematic "INLOCUIT ANVELOPE ..." cu OE-1 (223 vs 17 OE-8), desi RAR are cod dedicat OE-8 (inlocuire sezoniera anvelope), asa ca votul k-NN propunea OE-1 pentru orice inlocuire de anvelope. - tools/mapare-llm/fix_anvelope_oe8.py: re-etichetare deterministica (187 randuri DB + seed JSON -> OE-8; regula exclude singular cu pozitie, D/R, janta, vulcanizare) + 13 intrari canonice curate manual pentru formularile sezoniere absente din corpus ("MONTAT CAUCIUCURI VARA" etc.); idempotent - enrich_suggestions: ponderea votului = EMB_VOTE_DECAY^rang (0.7) in loc de similaritatea bruta — anizotropia modelului lasa zgomotul de coada (ex. INLOCUIT BECURII la 0.934 de INLOCUIRE ANVELOPE) sa invinga vecinii corecti de rang 1-2; LOO: precizie egala (93.1%), cod-gresit 4.67% -> 4.63% - test_fix_anvelope_oe8: gardii pe regula + seed-ul din repo (regresie la regenerare); auditul k-NN al dezacordurilor nu a gasit alte erori sistematice (curatat=OE-2, reglat=OE-4, bujii/ulei=OE-3 raman apararabile) Co-Authored-By: Claude Fable 5 --- app/data/operatii-etichetate.json | 852 +++++++++++++++------------ app/mapping.py | 15 +- tests/test_fix_anvelope_oe8.py | 58 ++ tools/mapare-llm/fix_anvelope_oe8.py | 165 ++++++ tools/mapare-llm/knn_calibrate.py | 16 +- 5 files changed, 722 insertions(+), 384 deletions(-) create mode 100644 tests/test_fix_anvelope_oe8.py create mode 100644 tools/mapare-llm/fix_anvelope_oe8.py diff --git a/app/data/operatii-etichetate.json b/app/data/operatii-etichetate.json index dcb70fb..acdd20c 100644 --- a/app/data/operatii-etichetate.json +++ b/app/data/operatii-etichetate.json @@ -44226,9 +44226,9 @@ { "denumire": "INLOCUIT + ECHILIBRAT ANVELOPE", "denumire_normalizata": "INLOCUIT + ECHILIBRAT ANVELOPE", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -44242,9 +44242,9 @@ { "denumire": "INLOCUIT +ECHILIBRAT ANVELOPE", "denumire_normalizata": "INLOCUIT +ECHILIBRAT ANVELOPE", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -46402,9 +46402,9 @@ { "denumire": "INLOCUIT ANVELOPE (AUTO-8)", "denumire_normalizata": "INLOCUIT ANVELOPE (AUTO-8)", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -46418,25 +46418,25 @@ { "denumire": "INLOCUIT ANVELOPE .", "denumire_normalizata": "INLOCUIT ANVELOPE .", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE 2 BUC", "denumire_normalizata": "INLOCUIT ANVELOPE 2 BUC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE 3 BUC", "denumire_normalizata": "INLOCUIT ANVELOPE 3 BUC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -46450,121 +46450,121 @@ { "denumire": "INLOCUIT ANVELOPE 6 BUC B 11 RTX)", "denumire_normalizata": "INLOCUIT ANVELOPE 6 BUC B 11 RTX)", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE 6 BUC.", "denumire_normalizata": "INLOCUIT ANVELOPE 6 BUC.", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-1082", "denumire_normalizata": "INLOCUIT ANVELOPE A-1082", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-1085", "denumire_normalizata": "INLOCUIT ANVELOPE A-1085", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-11897", "denumire_normalizata": "INLOCUIT ANVELOPE A-11897", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-1529", "denumire_normalizata": "INLOCUIT ANVELOPE A-1529", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-1597", "denumire_normalizata": "INLOCUIT ANVELOPE A-1597", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-1888", "denumire_normalizata": "INLOCUIT ANVELOPE A-1888", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-2067", "denumire_normalizata": "INLOCUIT ANVELOPE A-2067", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-2390", "denumire_normalizata": "INLOCUIT ANVELOPE A-2390", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE A-3215", "denumire_normalizata": "INLOCUIT ANVELOPE A-3215", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 11 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE B 11 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 111 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 111 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 13 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE B 13 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 131 DLZ", "denumire_normalizata": "INLOCUIT ANVELOPE B 131 DLZ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -46578,601 +46578,601 @@ { "denumire": "INLOCUIT ANVELOPE B 16 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 16 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 17 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 17 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 222 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 222 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 25 DYJ", "denumire_normalizata": "INLOCUIT ANVELOPE B 25 DYJ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 27 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 27 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 28 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 28 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 312 GPR", "denumire_normalizata": "INLOCUIT ANVELOPE B 312 GPR", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 313 GPR", "denumire_normalizata": "INLOCUIT ANVELOPE B 313 GPR", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 32 ZIL", "denumire_normalizata": "INLOCUIT ANVELOPE B 32 ZIL", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 35 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 35 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 37 ERR", "denumire_normalizata": "INLOCUIT ANVELOPE B 37 ERR", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 39 KGA", "denumire_normalizata": "INLOCUIT ANVELOPE B 39 KGA", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 45 FYP", "denumire_normalizata": "INLOCUIT ANVELOPE B 45 FYP", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 52 ARK", "denumire_normalizata": "INLOCUIT ANVELOPE B 52 ARK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 55 ABN", "denumire_normalizata": "INLOCUIT ANVELOPE B 55 ABN", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 55 ABP", "denumire_normalizata": "INLOCUIT ANVELOPE B 55 ABP", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 55 ABX", "denumire_normalizata": "INLOCUIT ANVELOPE B 55 ABX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 55 VLH", "denumire_normalizata": "INLOCUIT ANVELOPE B 55 VLH", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 55 XLU", "denumire_normalizata": "INLOCUIT ANVELOPE B 55 XLU", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 55 XMH", "denumire_normalizata": "INLOCUIT ANVELOPE B 55 XMH", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 55 XMJ", "denumire_normalizata": "INLOCUIT ANVELOPE B 55 XMJ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 55 XMK", "denumire_normalizata": "INLOCUIT ANVELOPE B 55 XMK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 56 EUT", "denumire_normalizata": "INLOCUIT ANVELOPE B 56 EUT", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 DGD", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 DGD", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MLL", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MLL", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MLO", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MLO", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MLZ", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MLZ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MMF", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MMF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MMJ", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MMJ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MMN", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MMN", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MMP", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MMP", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MNF", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MNF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MNH", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MNH", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MNK", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MNK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MNU", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MNU", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MNY", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MNY", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 MOJ", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 MOJ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 TFO", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 TFO", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 TFV", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 TFV", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 TFX", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 TFX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 TFZ", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 TFZ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 TGB", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 TGB", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 TGE", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 TGE", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 TGW", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 TGW", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 58 THF", "denumire_normalizata": "INLOCUIT ANVELOPE B 58 THF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 59 NHR", "denumire_normalizata": "INLOCUIT ANVELOPE B 59 NHR", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 59 NHS", "denumire_normalizata": "INLOCUIT ANVELOPE B 59 NHS", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 59 VOC", "denumire_normalizata": "INLOCUIT ANVELOPE B 59 VOC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 59 VWW", "denumire_normalizata": "INLOCUIT ANVELOPE B 59 VWW", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 59 VXV", "denumire_normalizata": "INLOCUIT ANVELOPE B 59 VXV", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 59 XNV", "denumire_normalizata": "INLOCUIT ANVELOPE B 59 XNV", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 59 ZAW", "denumire_normalizata": "INLOCUIT ANVELOPE B 59 ZAW", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 60 WBK", "denumire_normalizata": "INLOCUIT ANVELOPE B 60 WBK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 60 WST", "denumire_normalizata": "INLOCUIT ANVELOPE B 60 WST", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 62 XZF", "denumire_normalizata": "INLOCUIT ANVELOPE B 62 XZF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 63 EEU", "denumire_normalizata": "INLOCUIT ANVELOPE B 63 EEU", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 64 DHS", "denumire_normalizata": "INLOCUIT ANVELOPE B 64 DHS", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 64 ZNV", "denumire_normalizata": "INLOCUIT ANVELOPE B 64 ZNV", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 64 ZRF", "denumire_normalizata": "INLOCUIT ANVELOPE B 64 ZRF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 64 ZRG", "denumire_normalizata": "INLOCUIT ANVELOPE B 64 ZRG", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 CZF", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 CZF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 CZJ", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 CZJ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 EIM", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 EIM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 FKP", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 FKP", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 FMR", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 FMR", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 FNA", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 FNA", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 HKM", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 HKM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 HLE", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 HLE", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 KHF", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 KHF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 65 LJG", "denumire_normalizata": "INLOCUIT ANVELOPE B 65 LJG", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 66 BCZ", "denumire_normalizata": "INLOCUIT ANVELOPE B 66 BCZ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 66 HWD", "denumire_normalizata": "INLOCUIT ANVELOPE B 66 HWD", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 66 HWI", "denumire_normalizata": "INLOCUIT ANVELOPE B 66 HWI", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 66 HWS", "denumire_normalizata": "INLOCUIT ANVELOPE B 66 HWS", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 66 PFO", "denumire_normalizata": "INLOCUIT ANVELOPE B 66 PFO", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -47186,193 +47186,193 @@ { "denumire": "INLOCUIT ANVELOPE B 67 FGD", "denumire_normalizata": "INLOCUIT ANVELOPE B 67 FGD", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 67 KYN", "denumire_normalizata": "INLOCUIT ANVELOPE B 67 KYN", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 68 VRA", "denumire_normalizata": "INLOCUIT ANVELOPE B 68 VRA", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 68 VUM", "denumire_normalizata": "INLOCUIT ANVELOPE B 68 VUM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 68 VUN", "denumire_normalizata": "INLOCUIT ANVELOPE B 68 VUN", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 68 WGH", "denumire_normalizata": "INLOCUIT ANVELOPE B 68 WGH", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 69 EJB", "denumire_normalizata": "INLOCUIT ANVELOPE B 69 EJB", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 707 ARK", "denumire_normalizata": "INLOCUIT ANVELOPE B 707 ARK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 72 LOY", "denumire_normalizata": "INLOCUIT ANVELOPE B 72 LOY", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 72 LWP", "denumire_normalizata": "INLOCUIT ANVELOPE B 72 LWP", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 72 LWW", "denumire_normalizata": "INLOCUIT ANVELOPE B 72 LWW", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 73 TZH", "denumire_normalizata": "INLOCUIT ANVELOPE B 73 TZH", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 73 UDC", "denumire_normalizata": "INLOCUIT ANVELOPE B 73 UDC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 73 XFR", "denumire_normalizata": "INLOCUIT ANVELOPE B 73 XFR", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 83 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 83 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 94 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 94 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B 999 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B 999 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE B222 HRM", "denumire_normalizata": "INLOCUIT ANVELOPE B222 HRM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 01 WGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 01 WGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 03 PEM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 03 PEM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 03 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT 03 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 04 PEM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 04 PEM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 07 FGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 07 FGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 08 BPM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 08 BPM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -47386,33 +47386,33 @@ { "denumire": "INLOCUIT ANVELOPE CT 09 MYF", "denumire_normalizata": "INLOCUIT ANVELOPE CT 09 MYF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 09 MYL", "denumire_normalizata": "INLOCUIT ANVELOPE CT 09 MYL", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 10 CYY", "denumire_normalizata": "INLOCUIT ANVELOPE CT 10 CYY", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 10 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT 10 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -47426,41 +47426,41 @@ { "denumire": "INLOCUIT ANVELOPE CT 12 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT 12 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 14 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT 14 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 18 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT 18 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 19 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT 19 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 20 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT 20 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -47474,145 +47474,145 @@ { "denumire": "INLOCUIT ANVELOPE CT 29 PEM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 29 PEM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 30 ARK", "denumire_normalizata": "INLOCUIT ANVELOPE CT 30 ARK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 30 JXD", "denumire_normalizata": "INLOCUIT ANVELOPE CT 30 JXD", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 42 WGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 42 WGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 43 PET", "denumire_normalizata": "INLOCUIT ANVELOPE CT 43 PET", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 43 WGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 43 WGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 44 WGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 44 WGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 45 WGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 45 WGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 46 WGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 46 WGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 47 WGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 47 WGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 48 WGM", "denumire_normalizata": "INLOCUIT ANVELOPE CT 48 WGM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 56 PET", "denumire_normalizata": "INLOCUIT ANVELOPE CT 56 PET", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 57 WXW", "denumire_normalizata": "INLOCUIT ANVELOPE CT 57 WXW", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 65 JWR", "denumire_normalizata": "INLOCUIT ANVELOPE CT 65 JWR", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 66 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT 66 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 70 ARK", "denumire_normalizata": "INLOCUIT ANVELOPE CT 70 ARK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT 93 PET", "denumire_normalizata": "INLOCUIT ANVELOPE CT 93 PET", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE CT14 RTX", "denumire_normalizata": "INLOCUIT ANVELOPE CT14 RTX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -47634,313 +47634,313 @@ { "denumire": "INLOCUIT ANVELOPE GL 06 WWJ", "denumire_normalizata": "INLOCUIT ANVELOPE GL 06 WWJ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 06 WZB", "denumire_normalizata": "INLOCUIT ANVELOPE GL 06 WZB", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 07 AMH", "denumire_normalizata": "INLOCUIT ANVELOPE GL 07 AMH", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 07 BOK", "denumire_normalizata": "INLOCUIT ANVELOPE GL 07 BOK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 07 DOF", "denumire_normalizata": "INLOCUIT ANVELOPE GL 07 DOF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 07 ERR", "denumire_normalizata": "INLOCUIT ANVELOPE GL 07 ERR", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 07 ESB", "denumire_normalizata": "INLOCUIT ANVELOPE GL 07 ESB", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 BSP", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 BSP", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 GKB", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 GKB", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 GKC", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 GKC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 GKD", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 GKD", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 GKF", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 GKF", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 GKG", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 GKG", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 GKI", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 GKI", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 JGE", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 JGE", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 JGK", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 JGK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 LLJ", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 LLJ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 LLK", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 LLK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 08 SEB", "denumire_normalizata": "INLOCUIT ANVELOPE GL 08 SEB", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 09 LPK", "denumire_normalizata": "INLOCUIT ANVELOPE GL 09 LPK", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 09 LPL", "denumire_normalizata": "INLOCUIT ANVELOPE GL 09 LPL", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 09 LPP", "denumire_normalizata": "INLOCUIT ANVELOPE GL 09 LPP", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 09 MTZ", "denumire_normalizata": "INLOCUIT ANVELOPE GL 09 MTZ", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 09 RRG", "denumire_normalizata": "INLOCUIT ANVELOPE GL 09 RRG", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 09 UDM", "denumire_normalizata": "INLOCUIT ANVELOPE GL 09 UDM", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 09 UOX", "denumire_normalizata": "INLOCUIT ANVELOPE GL 09 UOX", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 13 CTC", "denumire_normalizata": "INLOCUIT ANVELOPE GL 13 CTC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 25 ABC", "denumire_normalizata": "INLOCUIT ANVELOPE GL 25 ABC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 41 ABC", "denumire_normalizata": "INLOCUIT ANVELOPE GL 41 ABC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 53 ABC", "denumire_normalizata": "INLOCUIT ANVELOPE GL 53 ABC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 63 ABS", "denumire_normalizata": "INLOCUIT ANVELOPE GL 63 ABS", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE GL 71 ABE", "denumire_normalizata": "INLOCUIT ANVELOPE GL 71 ABE", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE MAI 33297", "denumire_normalizata": "INLOCUIT ANVELOPE MAI 33297", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE MAI 33309", "denumire_normalizata": "INLOCUIT ANVELOPE MAI 33309", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE ROTI FATA", "denumire_normalizata": "INLOCUIT ANVELOPE ROTI FATA", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE+ECHILIB 2BUC", "denumire_normalizata": "INLOCUIT ANVELOPE+ECHILIB 2BUC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE+ECHILIBRAT", "denumire_normalizata": "INLOCUIT ANVELOPE+ECHILIBRAT", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE+PANA", "denumire_normalizata": "INLOCUIT ANVELOPE+PANA", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { "denumire": "INLOCUIT ANVELOPE- 2 BUC", "denumire_normalizata": "INLOCUIT ANVELOPE- 2 BUC", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -102546,9 +102546,9 @@ { "denumire": "MONTAT ANVELOPE (2)", "denumire_normalizata": "MONTAT ANVELOPE (2)", - "cod": "OE-1", + "cod": "OE-8", "is_nul": false, - "source": "haiku_seed", + "source": "haiku_seed+fix_oe8", "confidence": 0.7 }, { @@ -137446,5 +137446,109 @@ "is_nul": false, "source": "haiku_seed", "confidence": 0.7 + }, + { + "denumire": "INLOCUIRE ANVELOPE", + "denumire_normalizata": "INLOCUIRE ANVELOPE", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "SCHIMBARE ANVELOPE", + "denumire_normalizata": "SCHIMBARE ANVELOPE", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "SCHIMB ANVELOPE", + "denumire_normalizata": "SCHIMB ANVELOPE", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "SCHIMBAT ANVELOPE IARNA", + "denumire_normalizata": "SCHIMBAT ANVELOPE IARNA", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "SCHIMBAT ANVELOPE VARA", + "denumire_normalizata": "SCHIMBAT ANVELOPE VARA", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "MONTAT ANVELOPE IARNA", + "denumire_normalizata": "MONTAT ANVELOPE IARNA", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "MONTAT ANVELOPE VARA", + "denumire_normalizata": "MONTAT ANVELOPE VARA", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "MONTAT CAUCIUCURI IARNA", + "denumire_normalizata": "MONTAT CAUCIUCURI IARNA", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "MONTAT CAUCIUCURI VARA", + "denumire_normalizata": "MONTAT CAUCIUCURI VARA", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "SCHIMB CAUCIUCURI", + "denumire_normalizata": "SCHIMB CAUCIUCURI", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "SCHIMBAT ROTI IARNA", + "denumire_normalizata": "SCHIMBAT ROTI IARNA", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "SCHIMBAT ROTI VARA", + "denumire_normalizata": "SCHIMBAT ROTI VARA", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 + }, + { + "denumire": "INLOCUIRE SEZONIERA ANVELOPE", + "denumire_normalizata": "INLOCUIRE SEZONIERA ANVELOPE", + "cod": "OE-8", + "is_nul": false, + "source": "curat_manual", + "confidence": 1.0 } ] \ No newline at end of file diff --git a/app/mapping.py b/app/mapping.py index a962b63..fe78ed9 100644 --- a/app/mapping.py +++ b/app/mapping.py @@ -638,11 +638,18 @@ def delete_text_rule(conn, account_id: int | None, pattern: str) -> None: # 100% dar 7.4% cod gresit preselectat. EMB_MIN_SIMILARITATE = 0.88 -# Cati vecini intra in votul ponderat cu similaritatea. Vot > top-1: corpusul SILVER +# Cati vecini intra in votul ponderat pe rang. Vot > top-1: corpusul SILVER # are etichete contradictorii pe denumiri aproape identice; votul e imun la ele # (+~1pp precizie la acelasi coverage, masurat LOO). EMB_VOTE_TOP_K = 5 +# Ponderea unui vecin = EMB_VOTE_DECAY^rang (1-indexat). Ponderarea cu similaritatea +# bruta e pacalita de anizotropia modelului: vecini fara legatura scoreaza aproape +# cat cei buni (ex. INLOCUIT BECURII la 0.934 de INLOCUIRE ANVELOPE), deci coada +# de zgomot poate invinge 2 vecini corecti de rang 1-2. Ordinea rangurilor ramane +# informativa; decay 0.7 = cel mai mic cod-gresit la precizie egala (LOO). +EMB_VOTE_DECAY = 0.7 + # Protejeaza secventa hash->load->embed->save->purge->index (embedding_cache) de # executie concurenta intre warmup-ul de fundal (block=True) si calea de request # (block=False, dupa ce modelul e deja incarcat) -- altfel purjarea uneia ar sterge @@ -841,18 +848,18 @@ def enrich_suggestions( # deci query-ul TREBUIE normalizat la fel — altfel cosine degradeaza si # nu mai e configul sub care s-a masurat 94.3%. nn = _emb.suggest_nearest(normalize_for_match(denumire), top_k=EMB_VOTE_TOP_K) - # Vot ponderat cu similaritatea pe vecinii peste prag; NUL e eticheta + # Vot ponderat pe rang (decay^rang) pe vecinii peste prag; NUL e eticheta # proprie (castiga -> supresie, nu cod). Vecinii sub prag nu voteaza. scoruri: dict[str, float] = {} sim_max: dict[str, float] = {} - for v in nn: + for rang, v in enumerate(nn, 1): sim = float(v.get("similaritate", 0)) if sim < EMB_MIN_SIMILARITATE: continue lab = "NUL" if v.get("is_nul") else (str(v["cod"]) if v.get("cod") else None) if lab is None: continue - scoruri[lab] = scoruri.get(lab, 0.0) + sim + scoruri[lab] = scoruri.get(lab, 0.0) + EMB_VOTE_DECAY ** rang sim_max[lab] = max(sim_max.get(lab, 0.0), sim) if scoruri: castigator = max(scoruri, key=lambda k: scoruri[k]) diff --git a/tests/test_fix_anvelope_oe8.py b/tests/test_fix_anvelope_oe8.py new file mode 100644 index 0000000..e093f1c --- /dev/null +++ b/tests/test_fix_anvelope_oe8.py @@ -0,0 +1,58 @@ +"""Gardii pentru corectia anvelope->OE-8 (tools/mapare-llm/fix_anvelope_oe8.py). + +Doua niveluri: + 1. Regula `este_inlocuire_anvelope` pe cazuri pozitive/negative. + 2. Seed-ul real din repo NU mai contine inlocuiri de anvelope etichetate + altfel decat OE-8 (regresie la o viitoare regenerare a seed-ului). +""" +from __future__ import annotations + +import json +import os +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +TOOLS_DIR = os.path.abspath(os.path.join(HERE, "..", "tools", "mapare-llm")) +if TOOLS_DIR not in sys.path: + sys.path.insert(0, TOOLS_DIR) + +from fix_anvelope_oe8 import SEED_PATH, este_inlocuire_anvelope # noqa: E402 + + +def test_regula_pozitive(): + for t in [ + "INLOCUIT ANVELOPE B 55 XMH", + "INLOCUIT ANVELOPE 2 BUC", + "INLOCUIT + ECHILIBRAT ANVELOPE", + "SCHIMBAT ANVELOPE VARA", + "MONTAT ANVELOPE (2)", + "INL ANVELOPE + ECHILIBR", + ]: + assert este_inlocuire_anvelope(t), t + + +def test_regula_negative(): + for t in [ + "INLOCUIT ANVELOPA DR FATA", # singular cu pozitie = context reparatie + "D/R ANVELOPE(4 BUC)", # demontat/remontat, nu inlocuire + "INLOCUIT ANVELOPA+JANTA", # janta = reparatie + "REPARAT ANVELOPE", # vulcanizare/reparatie + "CHIRIE ANVELOPE AUGUST", # non-operatie (fara verb de inlocuire) + "INLOCUIT PLACUTE FRANA", # alta piesa + "VERIFICAT PRESIUNE ANVELOPE", # verificare, nu inlocuire + ]: + assert not este_inlocuire_anvelope(t), t + + +def test_seed_fara_inlocuiri_anvelope_gresite(): + """Orice intrare de inlocuire anvelope din seed trebuie sa fie OE-8.""" + with open(SEED_PATH, encoding="utf-8") as f: + items = json.load(f) + gresite = [ + it["denumire_normalizata"] + for it in items + if not it.get("is_nul") + and este_inlocuire_anvelope(it.get("denumire_normalizata") or "") + and it.get("cod") != "OE-8" + ] + assert gresite == [], f"{len(gresite)} inlocuiri de anvelope ne-OE-8 in seed: {gresite[:5]}" diff --git a/tools/mapare-llm/fix_anvelope_oe8.py b/tools/mapare-llm/fix_anvelope_oe8.py new file mode 100644 index 0000000..b82db83 --- /dev/null +++ b/tools/mapare-llm/fix_anvelope_oe8.py @@ -0,0 +1,165 @@ +"""Corectie etichete SILVER: inlocuirea de anvelope -> OE-8. + +Seed-ul Haiku a etichetat sistematic "INLOCUIT ANVELOPE ..." cu OE-1 (REPARATIE), +desi nomenclatorul RAR are un cod dedicat: OE-8 (INLOCUIRE SEZONIERA A ANVELOPELOR). +Eroarea domina vecinatatea k-NN (223 OE-1 vs 17 OE-8), asa ca votul sugera OE-1 +pentru orice "Inlocuire anvelope". + +Regula (deterministica, aceeasi in DB si in seed): + text NORMALIZAT care contine un verb de inlocuire/montare + (INLOCUIT/INLOCUIRE/INL/SCHIMB*/MONTAT/MONTARE) SI anvelope la plural + (ANVELOPE/CAUCIUCURI), FARA context de reparatie (JANTA, D/R, D/M, REPARAT, + VULCANIZ, PRESIUNE, DEPRESAT) -> OE-8. + Singularul cu pozitie ("INLOCUIT ANVELOPA DR FATA") ramane OE-1: e tipic + inlocuire dupa pana/uzura in cadrul unei reparatii, nu schimb sezonier. + +In plus, adauga intrari canonice OE-8 curate manual (`CURATE_OE8`) pentru +formularile uzuale de schimb sezonier absente din corpus ("MONTAT CAUCIUCURI +VARA" etc.) — fara ele, k-NN nu are niciun vecin relevant si votul cade pe +zgomot de coada. + +Aplica idempotent pe: + - tabela `mapping_suggestions` (sursa corpusului k-NN la runtime) + - `app/data/operatii-etichetate.json` (seed-ul pentru instalari noi) +`source` devine "haiku_seed+fix_oe8" pe randurile corectate, "curat_manual" +pe cele adaugate (audit). + +Rulare: + python3 tools/mapare-llm/fix_anvelope_oe8.py --db data/autopass.db [--dry-run] +""" +from __future__ import annotations + +import argparse +import json +import os +import re +import sqlite3 + +_HERE = os.path.dirname(os.path.abspath(__file__)) +_ROOT = os.path.abspath(os.path.join(_HERE, "..", "..")) +SEED_PATH = os.path.join(_ROOT, "app", "data", "operatii-etichetate.json") + +VERB = re.compile(r"\b(INLOCUIT|INLOCUIRE|INL|SCHIMB|SCHIMBAT|SCHIMBARE|MONTAT|MONTARE)\b") +PLURAL = re.compile(r"ANVELOPE|CAUCIUCURI") +EXCLUDERE = re.compile(r"JANTA|D/R|D/M|REPARAT|VULCANIZ|PRESIUNE|DEPRESAT") + +# Formulari canonice de schimb sezonier, absente din corpusul Haiku. +# Texte deja in forma normalizata (majuscule ASCII, fara diacritice). +CURATE_OE8 = [ + "INLOCUIRE ANVELOPE", + "SCHIMBARE ANVELOPE", + "SCHIMB ANVELOPE", + "SCHIMBAT ANVELOPE IARNA", + "SCHIMBAT ANVELOPE VARA", + "MONTAT ANVELOPE IARNA", + "MONTAT ANVELOPE VARA", + "MONTAT CAUCIUCURI IARNA", + "MONTAT CAUCIUCURI VARA", + "SCHIMB CAUCIUCURI", + "SCHIMBAT ROTI IARNA", + "SCHIMBAT ROTI VARA", + "INLOCUIRE SEZONIERA ANVELOPE", +] + + +def este_inlocuire_anvelope(text_normalizat: str) -> bool: + """True daca textul descrie o inlocuire/montare de anvelope (plural).""" + t = text_normalizat or "" + return bool(VERB.search(t) and PLURAL.search(t) and not EXCLUDERE.search(t)) + + +def fix_db(conn: sqlite3.Connection, dry_run: bool) -> int: + rows = conn.execute( + "SELECT id, denumire_normalizata FROM mapping_suggestions " + "WHERE is_nul=0 AND cod_prestatie != 'OE-8' " + "AND (denumire_normalizata LIKE '%ANVELOP%' OR denumire_normalizata LIKE '%CAUCIUC%')" + ).fetchall() + ids = [r[0] for r in rows if este_inlocuire_anvelope(r[1])] + if not dry_run and ids: + conn.executemany( + "UPDATE mapping_suggestions SET cod_prestatie='OE-8', " + "source='haiku_seed+fix_oe8', updated_at=datetime('now') WHERE id=?", + [(i,) for i in ids], + ) + conn.commit() + return len(ids) + + +def adauga_curate_db(conn: sqlite3.Connection, dry_run: bool) -> int: + n = 0 + for t in CURATE_OE8: + exists = conn.execute( + "SELECT 1 FROM mapping_suggestions WHERE denumire_normalizata=?", (t,) + ).fetchone() + if exists: + continue + n += 1 + if not dry_run: + conn.execute( + "INSERT INTO mapping_suggestions " + "(denumire_normalizata, cod_prestatie, is_nul, source, confidence) " + "VALUES (?, 'OE-8', 0, 'curat_manual', 1.0)", + (t,), + ) + if not dry_run: + conn.commit() + return n + + +def adauga_curate_seed(items: list[dict], dry_run: bool) -> int: + existente = {it.get("denumire_normalizata") for it in items} + n = 0 + for t in CURATE_OE8: + if t in existente: + continue + n += 1 + if not dry_run: + items.append({ + "denumire": t, + "denumire_normalizata": t, + "cod": "OE-8", + "is_nul": False, + "source": "curat_manual", + "confidence": 1.0, + }) + return n + + +def fix_seed(dry_run: bool) -> tuple[int, int]: + with open(SEED_PATH, encoding="utf-8") as f: + items = json.load(f) + n = 0 + for it in items: + if it.get("is_nul") or it.get("cod") == "OE-8": + continue + if este_inlocuire_anvelope(it.get("denumire_normalizata") or ""): + it["cod"] = "OE-8" + it["source"] = "haiku_seed+fix_oe8" + n += 1 + n_curate = adauga_curate_seed(items, dry_run) + if not dry_run and (n or n_curate): + with open(SEED_PATH, "w", encoding="utf-8") as f: + # acelasi format ca genereaza_seed.py (diff git minimal la corectii) + json.dump(items, f, ensure_ascii=False, indent=2) + return n, n_curate + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument("--db", default=os.path.join(_ROOT, "data", "autopass.db")) + ap.add_argument("--dry-run", action="store_true") + args = ap.parse_args() + + conn = sqlite3.connect(args.db) + n_db = fix_db(conn, args.dry_run) + n_db_curate = adauga_curate_db(conn, args.dry_run) + n_seed, n_seed_curate = fix_seed(args.dry_run) + eticheta = "(dry-run) " if args.dry_run else "" + print( + f"{eticheta}DB: {n_db} relabel + {n_db_curate} curate; " + f"seed JSON: {n_seed} relabel + {n_seed_curate} curate" + ) + + +if __name__ == "__main__": + main() diff --git a/tools/mapare-llm/knn_calibrate.py b/tools/mapare-llm/knn_calibrate.py index 8fd7aac..c0d3363 100644 --- a/tools/mapare-llm/knn_calibrate.py +++ b/tools/mapare-llm/knn_calibrate.py @@ -10,9 +10,12 @@ NU ground-truth uman — valorile absolute sunt optimiste; comparatia RELATIVA intre politici si calibrarea pragului raman valide (aceeasi tinta pentru toate). Politici evaluate: - top1 — eticheta primului vecin (comportamentul curent din enrich_suggestions) - vote — vot ponderat cu similaritatea pe top-k vecini peste prag; - NUL e eticheta proprie (castiga -> supresie) + top1 — eticheta primului vecin + vote — vot ponderat pe rang (EMB_VOTE_DECAY^rang) pe top-k vecini peste + prag; NUL e eticheta proprie (castiga -> supresie). Politica + livrata in enrich_suggestions. Ponderarea cu similaritatea bruta + a fost respinsa: anizotropia modelului lasa zgomotul de coada + (sim ~0.93 pe vecini fara legatura) sa invinga rangurile 1-2. Metrice (per politica x prag): coverage — % din exemple pentru care se emite o predictie (cod sau NUL) @@ -85,12 +88,13 @@ def predict_top1(nbr_labels: list[str], nbr_sims: np.ndarray, prag: float) -> st def predict_vote(nbr_labels: list[str], nbr_sims: np.ndarray, prag: float) -> str | None: - """Vot ponderat cu similaritatea pe vecinii peste prag.""" + """Vot ponderat pe rang (decay^rang) pe vecinii peste prag — politica din enrich.""" + from app.mapping import EMB_VOTE_DECAY scoruri: dict[str, float] = {} - for lab, sim in zip(nbr_labels, nbr_sims): + for rang, (lab, sim) in enumerate(zip(nbr_labels, nbr_sims), 1): if sim < prag: continue - scoruri[lab] = scoruri.get(lab, 0.0) + float(sim) + scoruri[lab] = scoruri.get(lab, 0.0) + EMB_VOTE_DECAY ** rang if not scoruri: return None return max(scoruri, key=lambda k: scoruri[k])