← back to Dw Material Reclassify

README.md

34 lines

# dw-material-reclassify

Wave-1 of the DW collection **Material filter** project (see
`~/Desktop/collection-update-spec` / the collection-update spec). Resolves the
"Textured/Woven" catch-all (Appendix A bucket 13) into real material buckets.

## classify.py — DRY RUN only
Classifies the ACTIVE New-Arrival Wallcoverings that have only a generic
`textured`/`woven` tag (no specific fiber). Tiers, cheapest first:

1. **tier1** — explicit `Material:` line in `body_html` (authoritative, free)
2. **tier1.5** — reliable material statement elsewhere in `body_html`
   (grasscloth / non-woven / `<fiber> wallcovering`), avoiding prose metaphors
3. **vision** — the true residual (no material text). COUNTED + COSTED here,
   **not called** in dry run.

Low-confidence title/colorway fiber matches ("Pop The Cork", "…& Linen") are
deliberately excluded (fiber words live in pattern names) and sent to vision.

```
python3 classify.py            # summary
python3 classify.py --samples  # + evidence samples
```

## Dry-run result (2026-07-22)
~80% resolved FREE from text; residual ~20% (~$0.05 vision @ $0.0006/img).
Dominant material = **Non-Woven** (not yet an Appendix-A bucket — decision pending).
Numbers drift a few % run-to-run because the dw_unified mirror is live.

## Hard rails
- Reads the LOCAL dw_unified mirror read-only. Writes NOTHING.
- No paid API is called in dry run. Any real vision pass + any `material_group`
  write to dw_unified is Steve-gated (canonical catalog).