feat(830-10): 불러오기 재료 찾기를 지역 · 상하차 칸에 맞춤 — 가져온 줄 글은 빌더 규칙으로 판독

- 새 M02_Mat_Place: 가져온 이름 · 규격 → (뺀 이름, 뺀 규격, 지역, 상하차)(material_merge 판독 한 벌) · 고르는 차례 rank
- 고르는 차례 = 상하차 맞음(글 없으면 -) › 값 있는 줄 › 줄 지역 › 전국 · 지역 모름 › 서울 › 경기 › 그 밖(값 가운데에 가까운 줄)
- Elem_Alias(_same · one · region_of) · Hopyo_Match(목록에 지역 · 상하차 · 값 · 이름 같음 = 뺀 이름 + 지역 · 상하차 같음) · Hopyo_Material(_places · 변형 지역 = 지역 칸 · _prefer) · MatSame._pick · MatFind 후보 글 = 지역 칸
- 다시 고르기 · 찾기 창 · 줄 풍선말 후보 글에 지역 · 상하차(M01 placeNote 한 벌)
- 시험: 814_1 · m02_hopyo_match 기대를 지역 칸 꼴로 · 새 지킴 test_830_10_material_region 21
- 불러오기 지킴 812_1 · 814_1 · 815_1 · 817_1 · 827_2 · 827_3 · 828_1 · 828_2 · 778_5 ×2 · 793_2 ×2 · 797_1 ×2 · m02_hopyo_match 통과 · typecheck 0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 20:57:23 +09:00
co-authored by Claude Opus 5.5
parent 98f3ab59cb
commit dd9ebad8d1
12 changed files with 305 additions and 40 deletions
+8 -3
View File
@@ -28,6 +28,7 @@ from typing import Any
from M02_MasterTemplete import M02_Hopyo_Match as hm
from M02_MasterTemplete import M02_Hopyo_Material as hmat
from M02_MasterTemplete import M02_Mat_Place as place
SPELL = (
(r"칠렌", "틸렌"),
@@ -189,16 +190,20 @@ def _scored(line: dict[str, Any]) -> tuple[dict[str, Any], list[tuple[tuple, dic
def _pick(group: list[dict[str, Any]], line: dict[str, Any]) -> dict[str, Any]:
"""한 품목의 변형 줄들 → 하나(줄 관급/사급 › 줄 지역 › 서울 › 같은 단위 › 엑셀 차례 — `M02_Elem_Alias.one` 과 같은 차례)."""
"""한 품목의 변형 줄들 → 하나(줄 관급/사급 › 상하차 › 지역 차례 › 같은 단위 › 값 가운데 › 엑셀 차례 —
`M02_Elem_Alias.one` 과 같은 차례 · `M02_Mat_Place.rank` · 830-10)."""
supply, regions = hmat._wants(line)
unit = hm.mm.plain_unit(line.get("단위"))
load = place.line(line.get("이름"), line.get("규격"))["상하차"]
mid = place.middle([x["row"]["one"] for x in group])
def rank(r: dict[str, Any]) -> tuple:
*head, gap = place.rank(r["one"], regions, load, mid)
return (
supply is not None and r["supply"] not in (None, supply),
bool(regions) and not hmat._hit(r, regions),
"서울" not in r["region"],
*head,
r["key"][1] != unit,
gap,
r["at"],
)