Skip to content

fix(data): merge 29 confirmed laptop near-duplicate records - #332

Merged
Seungpyo1007 merged 2 commits into
developfrom
Seungpyo1007/laptop-dedup-scan
Sep 29, 2026
Merged

Seungpyo1007 merged 2 commits into
developfrom
Seungpyo1007/laptop-dedup-scan

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

Summary

Scanned data/laptop/ (1,995 records) for near-duplicates using the same method as the tablet/watch pass (#324) and smartphone pass (#329): slug/name normalization (punctuation- and brand-prefix-agnostic) plus a spec cross-check (release_date, cpu ref, cpu_name, ram_gb, storage_gb, display size/resolution, gpu, weight, os). Merged 29 confirmed duplicate groups and left all configuration variants untouched.

1995 → 1966 laptop records.

Per-pattern breakdown

Pattern 1 — identical scrape imported twice under different row-id slugs: 29 groups (all merged).
Each group was two files that were byte-identical except slug and variant.source_row — i.e. the same device row imported twice from Ammok/laptop_price_prediction under two different row ids. Merge rule: keep the file with the lower source_row (deterministic), delete the other. source_urls were identical in every group, so the union is a no-op; no field value was changed or invented.

Groups by brand: acer (1), dell (13), hp (3), lenovo (8), msi (2), toshiba (2).

All 29 merged groups (kept ← removed)
Brand Model Kept slug Removed slug
acer Acer Aspire 7 acer-aspire-7-ammok-211 acer-aspire-7-ammok-380
dell Dell Alienware 17 dell-alienware-17-ammok-531 dell-alienware-17-ammok-553
dell Dell Alienware 17 dell-alienware-17-ammok-842 dell-alienware-17-ammok-969
dell Dell Inspiron 7567 dell-inspiron-7567-ammok-152 dell-inspiron-7567-ammok-774
dell Dell XPS 15 dell-xps-15-ammok-187 dell-xps-15-ammok-351
dell Dell XPS 15 dell-xps-15-ammok-294 dell-xps-15-ammok-630
dell Dell Inspiron 5370 dell-inspiron-5370-ammok-72 dell-inspiron-5370-ammok-216
dell Dell Inspiron 5570 dell-inspiron-5570-ammok-28 dell-inspiron-5570-ammok-537
dell Dell Inspiron 5570 dell-inspiron-5570-ammok-356 dell-inspiron-5570-ammok-427
dell Dell Inspiron 5570 dell-inspiron-5570-ammok-514 dell-inspiron-5570-ammok-658
dell Dell Inspiron 5570 dell-inspiron-5570-ammok-73 dell-inspiron-5570-ammok-657
dell Dell Inspiron 5770 dell-inspiron-5770-ammok-61 dell-inspiron-5770-ammok-129
dell Dell Inspiron 5770 dell-inspiron-5770-ammok-190 dell-inspiron-5770-ammok-261
dell Dell XPS 13 dell-xps-13-ammok-209 dell-xps-13-ammok-345
hp HP EliteBook x360 hp-elitebook-x360-ammok-881 hp-elitebook-x360-ammok-886
hp HP ProBook 430 hp-probook-430-ammok-170 hp-probook-430-ammok-249
hp HP ProBook 470 hp-probook-470-ammok-30 hp-probook-470-ammok-80
lenovo Lenovo IdeaPad 320-17IKB lenovo-ideapad-320-17ikb-ammok-281 lenovo-ideapad-320-17ikb-ammok-558
lenovo Lenovo Legion Y720-15IKB lenovo-legion-y720-15ikb-ammok-204 lenovo-legion-y720-15ikb-ammok-233
lenovo Lenovo Legion Y720-15IKB lenovo-legion-y720-15ikb-ammok-296 lenovo-legion-y720-15ikb-ammok-521
lenovo Lenovo ThinkPad T470s lenovo-thinkpad-t470s-ammok-723 lenovo-thinkpad-t470s-ammok-894
lenovo Lenovo ThinkPad X270 lenovo-thinkpad-x270-ammok-650 lenovo-thinkpad-x270-ammok-927
lenovo Lenovo ThinkPad Yoga lenovo-thinkpad-yoga-ammok-597 lenovo-thinkpad-yoga-ammok-793
lenovo Lenovo Yoga 910-13IKB lenovo-yoga-910-13ikb-ammok-245 lenovo-yoga-910-13ikb-ammok-799
lenovo Lenovo Yoga 920-13IKB lenovo-yoga-920-13ikb-ammok-183 lenovo-yoga-920-13ikb-ammok-344
msi MSI GE72MVR 7RG msi-ge72mvr-7rg-ammok-149 msi-ge72mvr-7rg-ammok-812
msi MSI GL72M 7REX msi-gl72m-7rex-ammok-331 msi-gl72m-7rex-ammok-725
toshiba Toshiba Satellite Pro toshiba-satellite-pro-ammok-144 toshiba-satellite-pro-ammok-807
toshiba Toshiba Satellite Pro toshiba-satellite-pro-ammok-174 toshiba-satellite-pro-ammok-838

Pattern 2 — same device in two sibling dirs via brand-prefix path variance (e.g. dell-xps-13 vs xps-13): none found.
Every record is stored under a consistent brand-prefixed base_model_slug; there were zero cases of the same brand+name living under two different base directories.

Pattern 3 — cross-source duplicates under different slug conventions: none found.
No device name appears in both bulk datasets (Ammok/laptop_price_prediction and abhinavflac/laptops-specs-dataset). The two datasets cover disjoint eras/models. The only cross-checkable identical-spec collisions were different SKUs that happen to share the Ammok dataset's coarse specs (e.g. Acer Aspire ES1-572 vs Acer Extensa EX2540) — those were correctly not merged because their names differ.

Placeholder / fabricated-defaults check

No systemic placeholder-value bug (the equivalent of the phone battery_mah=1500 / weight_g=150.0 stamping) is present in laptop data. ram_gb, storage_gb, weight_g, and display.size_inch all show organic distributions with distinct-name diversity proportional to frequency (e.g. ram_gb=16 across 735 distinct model names; storage_gb=512 across 739; the most common weight_g=2200.0 spans 41 distinct models). No single value is stamped across many unrelated devices. The two lowest-diversity weight values (1860.0 and 2180.0, ~3 distinct names each) are simply config variants of a few models, not fabricated defaults.

Conflicts found / resolved

None. Because every merged pair was byte-identical outside slug/variant.source_row, there were no field disagreements to reconcile — nothing was repaired, so no source citations were required beyond the existing source_urls (which matched within each pair).

Validation

  • python -m app.validate → passed.
  • python integrity_check.py <data> --strict → no hard anomalies (only the pre-existing advisory CPU/GPU benchmark ratio outliers, which the gate treats as review-only).
  • Dump refreshed as the last commit: python -m app.dump run from the TechEngine checkout against a fresh scratch database with TECHAPI_DATA_DIR pointing at this worktree. Scope kept to the laptop collection (removed the 29 orphaned per-slug pages; updated the laptop list + manifest count 1995 → 1966). Unrelated pre-existing dump drift in other collections was deliberately excluded to keep the diff reviewable.

Closes #296

Each removed record was a byte-identical re-import of a device that already
exists under a different Ammok row-id slug (Pattern 1: same scrape imported
twice). Within each group the two files differed only in `slug` and
`variant.source_row`; every real spec field (name, brand, cpu, release_date,
device_category, cpu_name, gpu_name, gpu_type, ram_gb, storage_gb, display,
weight_g, os) plus `source_urls` matched exactly, so the merge kept the file
with the lower `source_row` and dropped the redundant one. `source_urls`
were identical, so the union is a no-op and no field values were altered or
invented.

Configuration variants (same model, different CPU/RAM/storage) were left
untouched -- those are distinct real SKUs, not duplicates.

29 groups across acer(1), dell(13), hp(3), lenovo(8), msi(2), toshiba(2).
1995 -> 1966 laptop records.
Regenerated the static laptop dump from the deduped dataset (python -m app.dump
against a fresh scratch database seeded from this worktree). Drops the 29
orphaned per-slug pages for the removed duplicates and updates the laptop
collection count in the list and manifest (1995 -> 1966). Scope limited to the
laptop collection touched by this change.
@github-actions github-actions Bot added bug Something isn't working data Dataset changes enhancement New feature or request labels Sep 29, 2026
@Seungpyo1007
Seungpyo1007 merged commit 1f961ee into develop Sep 29, 2026
5 checks passed
@Seungpyo1007
Seungpyo1007 deleted the Seungpyo1007/laptop-dedup-scan branch September 29, 2026 12:47
@Seungpyo1007 Seungpyo1007 removed the enhancement New feature or request label Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working data Dataset changes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Data accuracy: corrections, duplicates and dates (workstream)

1 participant