v2 - 문제2 36문항

This commit is contained in:
2025-05-14 18:01:36 +09:00
parent 8c93c6d446
commit 872d5f6da6
5 changed files with 301 additions and 12 deletions

Binary file not shown.

View File

@@ -87,7 +87,7 @@
"item": "문구 (클라우드컴퓨팅컨퍼런스)/⑤ 위치 (글자처럼 취급)"
},
"6": {
"path": "//PARASHAPE[@Id=//TEXTART[@Text='{searchValue}']/ancestor::P/@ParaShape]/@Align",
"path":"//PARASHAPE[@Id=//P[.//TEXTART[@Text='클라우드컴퓨팅컨퍼런스']]/@ParaShape]/@Align",
"searchValue": "클라우드컴퓨팅컨퍼런스",
"value": "Center",
"points": 2,
@@ -184,7 +184,7 @@
"item": "문구 (● 참여안내 ●)/② 정렬 (가운데 정렬)"
},
"17": {
"path": "//CHARSHAPE[@Id=//CHAR[text()='{searchValue}']/parent::TEXT/@CharShape]",
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]",
"searchValue": "홈페이지(http://www.ihd.or.kr) 참조",
"value": "ITALIC",
"points": 1,
@@ -192,7 +192,7 @@
"item": "문구 (홈페이지(http://www.ihd.or.kr) 참조)/① 기울임"
},
"18": {
"path": "//CHARSHAPE[@Id=//CHAR[text()='{searchValue}']/parent::TEXT/@CharShape]",
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]",
"searchValue": "홈페이지(http://www.ihd.or.kr) 참조",
"value": "UNDERLINE",
"points": 1,
@@ -229,7 +229,7 @@
"item": "문구 (2025. 04. 26.)/② 정렬 (가운데 정렬)"
},
"22": {
"path": "//CHAR[text()='{searchValue}']/parent::TEXT/@CharShape",
"path": "//TEXT[CHAR[text()='{searchValue}']]/@CharShape",
"searchValue": "글로벌멀티클라우드협의회",
"value": "궁서체",
"points": 1,
@@ -237,7 +237,7 @@
"item": "문구 (글로벌멀티클라우드협의회)/① 글씨체 (궁서체)"
},
"23": {
"path": "//CHARSHAPE[@Id=//CHAR[text()='{searchValue}']/parent::TEXT/@CharShape]/@Height",
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]/@Height",
"searchValue": "글로벌멀티클라우드협의회",
"value": "2600",
"points": 1,
@@ -253,7 +253,7 @@
"item": "문구 (글로벌멀티클라우드협의회)/③ 정렬 (가운데 정렬)"
},
"25": {
"path": "//CHAR[text()='{searchValue}']/parent::TEXT/@CharShape",
"path": "//TEXT[CHAR[text()='{searchValue}']]/@CharShape",
"searchValue": "DIAT",
"value": "궁서",
"points": 1,
@@ -261,13 +261,13 @@
"item": "문구 (DIAT)/① 글꼴 (궁서)"
},
"26": {
"path": "//CHARSHAPE[@Id=//SECTION[1]//CHAR[text()='{searchValue}']/parent::TEXT/@CharShape]/@Height",
"path": "//CHARSHAPE[@Id=//SECTION[1]//TEXT[CHAR[text()='{searchValue}']]/@CharShape]/@Height",
"searchValue": "DIAT",
"value": "900",
"points": 1,
"category": "SingleAnswer",
"item": "문구 (DIAT)/② 크기 (9pt)"
},
},
"27": {
"path": "//PARASHAPE[@Id=//SECTION[1]//CHAR[text()='{searchValue}']/parent::TEXT/parent::P/@ParaShape]/@Align",
"searchValue": "DIAT",
@@ -361,9 +361,265 @@
"value": [ "DoubleSlim", "283" ],
"points": 2,
"category": "DoubleAnswer",
"item": "문구 (클라우드 컴퓨팅)/③ 테두리 : 이중 실선(1.00mm)"
"item": "문구 (클라우드 컴퓨팅)/③ 테두리 : 이중 실선(1.00mm)",
"desc": "1mm = 283pt"
},
"7": {
"path": "//RECTANGLE[.//CHAR[text()='{searchValue}']]/@Ratio",
"searchValue": "클라우드 컴퓨팅",
"value": "50",
"points": 2,
"category": "SingleAnswer",
"item": "문구 (클라우드 컴퓨팅)/④ 글상자 모서리 (반원)"
},
"8": {
"path": "//RECTANGLE[.//CHAR[text()='{searchValue}']]//WINDOWBRUSH/@FaceColor",
"searchValue": "클라우드 컴퓨팅",
"value": "202,86,167",
"points": 2,
"category": "Color",
"item": "문구 (클라우드 컴퓨팅)/⑤ 채우기 : 색상(RGB:202,86,167)"
},
"9": {
"path": "//RECTANGLE[.//CHAR[text()='{searchValue}']]/SHAPEOBJECT/POSITION/@TreatAsChar",
"searchValue": "클라우드 컴퓨팅",
"value": "true",
"points": 1,
"category": "SingleAnswer",
"item": "문구 (클라우드 컴퓨팅)/⑥ 글상자 위치 (글자처럼 취급)"
},
"10": {
"path": "//PARASHAPE[@Id=//RECTANGLE//CHAR[text()='{searchValue}']/ancestor::P[last()]/@ParaShape]/@Align",
"searchValue": "클라우드 컴퓨팅",
"value": "Center",
"points": 1,
"category": "SingleAnswer",
"item": "문구 (클라우드 컴퓨팅)/⑦ 글상자 정렬 (가운데 정렬)"
},
"11": {
"path": "//TEXT[CHAR[text()='{searchValue}']]/@CharShape",
"searchValue": "클라우드 컴퓨팅",
"value": "견고딕",
"points": 1,
"category": "FontName",
"item": "문구 (클라우드 컴퓨팅)/⑧ 글씨체 (견고딕)",
"desc": "폰트 '견고딕'과 '중고딕'은 한글프로그램 내부적으로 '한양견고딕', '한양중고딕'처리 되어서 프로그램 내부에서 수험자 답변에서 '한양'을 제거하는 과정을 거침"
},
"12": {
"path": "//CHARSHAPE[@Id=//RECTANGLE//TEXT[./CHAR[text()='{searchValue}']]/@CharShape]/@Height",
"searchValue": "클라우드 컴퓨팅",
"value": "2000",
"points": 1,
"category": "SingleAnswer",
"item": "문구 (클라우드 컴퓨팅)/⑨ 글씨크기 (20pt)",
"desc":"1pt당 100"
},
"13": {
"path": "//PARASHAPE[@Id=//RECTANGLE//P[.//CHAR[text()='{searchValue}']]/@ParaShape]/@Align",
"searchValue": "클라우드 컴퓨팅",
"value": "Center",
"points": 1,
"category": "SingleAnswer",
"item": "문구 (클라우드 컴퓨팅)/⑩ 정렬 (가운데 정렬)"
},
"14": {
"path": "boolean(//PICTURE//SHAPECOMMENT[contains(text(),'{searchValue}')])",
"searchValue": "원본 그림의 이름: 그림",
"value": true,
"points": 2,
"category": "Boolean",
"item": "① 파일명 \"그림A.jpg\" 삽입"
},
"15": {
"path": "//PICTURE[./IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]]/SHAPEOBJECT/SIZE/@Width",
"value": "80",
"points": 2,
"category": "mmSize",
"item": "② 크기-너비 (80mm)"
},
"16": {
"path": "//PICTURE[./IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]]/SHAPEOBJECT/SIZE/@Height",
"value": "45",
"points": 2,
"category": "mmSize",
"item": "③ 크기-높이 (45mm)"
},
"17": {
"path": "//PICTURE[./IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]]/SHAPEOBJECT/POSITION/@HorzOffset",
"value": "0",
"points": 2,
"category": "mmSize",
"item": "④ 위치 (어울림 : 가로-쪽의 왼쪽 0.0mm)"
},
"18": {
"path": "//PICTURE[./IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]]/SHAPEOBJECT/POSITION/@VertOffset",
"value": "24",
"points": 2,
"category": "mmSize",
"item": "⑤ 위치 (어울림 : 세로-쪽의 위 24mm)"
},
"19": {
"path": "//TEXT[CHAR[text()='{searchValue}']]/@CharShape",
"searchValue": "1. 주목하는 최신 트렌드",
"value": "굴림",
"points": 1,
"category": "FontName",
"item": "문구① (1. 주목하는 최신 트렌드)/① 글씨체 (굴림)"
},
"20": {
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]/@Height",
"searchValue": "1. 주목하는 최신 트렌드",
"value": "1200",
"points": 1,
"category": "SingleAnswer",
"item": "문구① (1. 주목하는 최신 트렌드)/② 크기 (12pt)"
},
"21": {
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]",
"searchValue": "1. 주목하는 최신 트렌드",
"value": "BOLD",
"points": 1,
"category": "FontAttribute",
"item": "문구① (1. 주목하는 최신 트렌드)/③ 진하게"
},
"22": {
"path": "//TEXT[CHAR[text()='{searchValue}']]/@CharShape",
"searchValue": "2. 기술의 경제적 가치",
"value": "굴림",
"points": 1,
"category": "FontName",
"item": "문구② (2. 기술의 경제적 가치)/① 글씨체 (굴림)"
},
"23": {
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]/@Height",
"searchValue": "2. 기술의 경제적 가치",
"value": "1200",
"points": 1,
"category": "SingleAnswer",
"item": "문구② (2. 기술의 경제적 가치)/② 크기 (12pt)"
},
"24": {
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]",
"searchValue": "2. 기술의 경제적 가치",
"value": "BOLD",
"points": 1,
"category": "FontAttribute",
"item": "문구② (2. 기술의 경제적 가치)/③ 진하게"
},
"25": {
"path": "boolean(//TEXT[CHAR[contains(text(),'{searchValue}')]]/FOOTNOTE)",
"path2": "boolean(//CHAR[substring(., string-length(.) - string-length('{searchValue}') + 1) = '{searchValue}']/following-sibling::FOOTNOTE/descendant::CHAR)",
"searchValue": "클라우드",
"value": true,
"points": 2,
"category": "Boolean",
"item": "문구 (클라우드)/① 각주 설정 및 문구 입력"
},
"26": {
"path": "//CHAR[contains(text(),'{searchValue}')]/parent::TEXT/@CharShape",
"searchValue": "인터넷을 통해 액세스할 수 있는 가상화된 서버에서 실행되는 프로그램과 데이터베이스를 제공하는 환경",
"value": "중고딕",
"points": 1,
"category": "FontName",
"item": "문구 (클라우드)/② 글씨체 (중고딕)"
},
"27": {
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[contains(text(),'{searchValue}')]]/@CharShape]/@Height",
"searchValue": "인터넷을 통해 액세스할 수 있는 가상화된 서버에서 실행되는 프로그램과 데이터베이스를 제공하는 환경",
"value": "900",
"points": 1,
"category": "SingleAnswer",
"item": "문구 (클라우드)/③ 크기 (9pt)"
},
"28": {
"path": "//P[TEXT[CHAR[contains(text(), '{searchValue}')]]]//AUTONUMFORMAT/@Type",
"searchValue": "인터넷을 통해 액세스할 수 있는 가상화된 서버에서 실행되는 프로그램과 데이터베이스를 제공하는 환경",
"value": "Ideograph",
"points": 2,
"category": "SingleAnswer",
"item": "문구 (클라우드)/④ 각주 번호모양",
"desc": {
"가,나,다":"HangulSyllable",
"1,2,3":"Digit",
"갑,을,병":"DecagonCircle",
"A,B,C":"LatinCapital",
"①,②,③":"CircledDigit",
"一,二,三":"Ideograph",
"㉠,㉡,㉢":"CircledHangulJamo",
"ⓐ,ⓑ,ⓒ":"CircledLatinSmall",
"i,ii,iii":"RomanSmall",
"정답에 맞는 값 value에 입력":""
}
},
"29": {
"path": "boolean(//CHAR[contains(text(),'Digital')])",
"ignoreWord": "Digital",
"value": true,
"points": 3,
"category": "Boolean",
"item": "Digital/영단어 미입력, 대소문자/오타 시 전체 감점",
"desc": "유사도 검사를 진행하지 않고 영단어가 모두 일치해야 하므로 xpath구문 내 단어도 수정필요"
},
"30": {
"path": "//CHAR[contains(text(),'{kor}')][contains(text(),'{chn}')]",
"word":[
["전환", "轉換"],
["핵심", "核心"],
["확산", "擴散"],
["보안", "保安"],
["도입", "導入"]
],
"value": 10,
"points": 10,
"category": "Hanja",
"item": "① 전환(轉換), ② 핵심(核心), ③ 확산(擴散), ④ 보안(保安), ⑤ 도입(導入)"
},
"31": {
"path": "boolean(//CHAR[contains(translate(text(), ' ', ''),'션이발전')])",
"value": true,
"points": 3,
"category": "Boolean",
"item": "문구 (…보안(保安) 솔루션은 발전하면서…)/\"은\" → \"이\" 글자바꿈"
},
"32": {
"path": "boolean(//CHAR[contains(translate(text(), ' ', ''),'이터유출')])",
"value": true,
"points": 3,
"category": "Boolean",
"item": "문구 (…유출과 데이터 사이버…)/\"유출과\" / \"데이터\" 순서바꿈"
},
"33": {
"path": "//TEXT[CHAR[text()='{searchValue}']]/@CharShape",
"searchValue": "클라우드 보안(단위: 백만 달러)",
"value": "돋움",
"points": 1,
"category": "FontName",
"item": "제목 문구 (클라우드 보안(단위: 백만 달러))/① 글씨체 (돋움)"
},
"34": {
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]/@Height",
"searchValue": "클라우드 보안(단위: 백만 달러)",
"value": "1200",
"points": 1,
"category": "SingleAnswer",
"item": "제목 문구 (클라우드 보안(단위: 백만 달러))/② 크기 (12pt)"
},
"35": {
"path": "//CHARSHAPE[@Id=//TEXT[CHAR[text()='{searchValue}']]/@CharShape]",
"searchValue": "클라우드 보안(단위: 백만 달러)",
"value": "BOLD",
"points": 1,
"category": "FontAttribute",
"item": "제목 문구 (클라우드 보안(단위: 백만 달러))/③ 진하게"
},
"36": {
"path": "//PARASHAPE[@Id=//P[.//CHAR[text()='{searchValue}']]/@ParaShape]/@Align",
"searchValue": "클라우드 보안(단위: 백만 달러)",
"value": "Center",
"points": 1,
"category": "SingleAnswer",
"item": "제목 문구 (클라우드 보안(단위: 백만 달러))/④ 정렬 (가운데 정렬)"
},
"61": {}
}
}

View File

@@ -343,7 +343,9 @@ class XMLScorer:
# Boolean 타입 정답인 경우
elif "Boolean" in (category or ""):
items = root.xpath(xpath)
user_answer = True if items else False
items2 = root.xpath(xpath2) if xpath2 else False
user_answer = bool( items or items2 )
self.evaluate_answer(scoring, user_answer, right_answer, points)
@@ -387,6 +389,12 @@ class XMLScorer:
font_id = root.xpath(f"//CHARSHAPE[@Id='{charshape_id[0]}']/FONTID/@Hangul")
font_name = root.xpath(f"//FONTFACE[@Lang='Hangul']/FONT[@Id='{font_id[0]}']/@Name")
user_answer = font_name[0]
# 폰트 "견고딕"과 "중고딕"은
# 한글프로그램 내부적으로 "한양견고딕", "한양중고딕"으로 저장되므로
# 수험자 답변에서 "한양"을 제거
if right_answer in ["견고딕", "중고딕"]:
user_answer = user_answer.replace("한양", "")
self.evaluate_answer(scoring, user_answer, right_answer, points, method="equal")
@@ -483,6 +491,31 @@ class XMLScorer:
self.evaluate_answer(scoring, user_answer, right_answer, points, method="equal")
elif "Hanja" in (category or ""):
word_list = criterion.get('word', [])
# 점수 계산
score = 0
max_score = points
# 부분점수 (최대점수에서 한자 갯수만큼 나눈 몫)
score_per_pair = max_score // len(word_list)
# 한자가 5개 고정일 경우
# score_per_pair = 2
for kor, chn in word_list:
# XPath 구문 구성 및 실행
exec_xpath = xpath.replace('{kor}', kor).replace('{chn}', chn)
matched = root.xpath(exec_xpath)
if matched:
score += score_per_pair
# 최대 점수 초과 방지
user_answer = min(score, max_score)
self.evaluate_answer(scoring, user_answer, right_answer, points, method="partial_score")
onePersonResult['score_results'].append(scoring)
print(f'scoring: {scoring}')

View File

@@ -1 +1 @@
[{"kind":2,"language":"xpath","value":"//BORDERFILL[@Id=//PAGEBORDERFILL[@Type='Both' or @Type='Even']/@BorferFill]/*[contains(local-name(), 'BORDER')]/@Type"},{"kind":2,"language":"xpath","value":"//BORDERFILL[@Id=//SECTION[2]//PAGEBORDERFILL[@Type='Both' or @Type='Even']/@BorferFill]"},{"kind":2,"language":"xpath","value":"//RECTANGLE//CHAR[text()='클라우드 컴퓨팅']/ancestor::RECTANGLE/descendant::LINESHAPE"},{"kind":2,"language":"xpath","value":"//RECTANGLE[.//CHAR[text()='클라우드 컴퓨팅']]//LINESHAPE"},{"kind":2,"language":"xpath","value":"//BORDERFILL[@Id=//SECTION[2]//PAGEBORDERFILL[@Type='Both' or @Type='Even']/@BorferFill][not(*[substring(name(), string-length(name()) - 5) = 'BORDER'][not(@Type = 'DoubleSlim')])]"},{"kind":2,"language":"xpath","value":"//BORDERFILL[*[substring(name(), string-length(name()) - 5) = 'BORDER' and @Type = 'DoubleSlim']]"}]
[{"kind":2,"language":"xpath","value":"//BORDERFILL[@Id=//PAGEBORDERFILL[@Type='Both' or @Type='Even']/@BorferFill]/*[contains(local-name(), 'BORDER')]/@Type"},{"kind":2,"language":"xpath","value":"//BORDERFILL[@Id=//SECTION[2]//PAGEBORDERFILL[@Type='Both' or @Type='Even']/@BorferFill]"},{"kind":2,"language":"xpath","value":"//RECTANGLE//CHAR[text()='클라우드 컴퓨팅']/ancestor::RECTANGLE/descendant::LINESHAPE"},{"kind":2,"language":"xpath","value":"//RECTANGLE[.//CHAR[text()='클라우드 컴퓨팅']]//LINESHAPE"},{"kind":2,"language":"xpath","value":"//RECTANGLE[.//CHAR[text()='클라우드 컴퓨팅']]/SHAPEOBJECT/POSITION/@TreatAsChar"},{"kind":2,"language":"xpath","value":"//PARASHAPE[@Id=//RECTANGLE//CHAR[text()='{searchValue}']/ancestor::P[last()]/@ParaShape]/@Align"},{"kind":2,"language":"xpath","value":"//CHARSHAPE[@Id=//RECTANGLE//CHAR[text()='클라우드 컴퓨팅']/parent::TEXT/@CharShape]/@Height"},{"kind":2,"language":"xpath","value":"//PARASHAPE[@Id=//RECTANGLE//P[.//CHAR[text()='{searchValue}']]/@ParaShape]/@Align"},{"kind":2,"language":"xpath","value":"//IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]/preceding-sibling::SHAPEOBJECT/SIZE/@Width"},{"kind":2,"language":"xpath","value":"//CHAR[text()='{searchValue}']/parent::TEXT/@CharShape"},{"kind":2,"language":"xpath","value":"//TEXT[CHAR[text()='{searchValue}']]/@CharShape"},{"kind":2,"language":"xpath","value":"//PARASHAPE[@Id=//P[.//TEXTART[@Text='클라우드컴퓨팅컨퍼런스']]/@ParaShape]/@Align"},{"kind":2,"language":"xpath","value":"//CHARSHAPE[@Id=//TEXT[CHAR[contains(text(),'클라우드 보안(단위: 백만 달러)')]]/@CharShape]/@Height"},{"kind":2,"language":"xpath","value":"//TEXT[CHAR[contains(text(),'클라우드')]]/FOOTNOTE[CHAR[contains(text(),'인터넷을 통해 액세스할 수 있는 가상화된 서버에서 실행되는 프로그램과 데이터베이스를 제공하는 환경')]]"},{"kind":2,"language":"xpath","value":"//TEXT[CHAR[contains(text(),'클라우드')]]/FOOTNOTE[.//CHAR[contains(text(),'인터넷을 통해 액세스할 수 있는 가상화된 서버에서 실행되는 프로그램과 데이터베이스를 제공하는 환경')]]"},{"kind":2,"language":"xpath","value":"//TEXT[CHAR[contains(text(),'클라우드')]]/FOOTNOTE"},{"kind":2,"language":"xpath","value":"//CHARSHAPE[@Id=//TEXT[CHAR[text()='클라우드 보안(단위: 백만 달러)']]/@CharShape]"},{"kind":2,"language":"xpath","value":"//PARASHAPE[@Id=//P[.//CHAR[text()='클라우드 보안(단위: 백만 달러)']]/@ParaShape]/@Align"},{"kind":2,"language":"xpath","value":"//PARASHAPE[@Id=//CHAR[contains(text(),'클라우드 보안(단위: 백만 달러)')]/ancestor::P/@ParaShape]/@Align"},{"kind":2,"language":"xpath","value":"//P[.//CHAR[text()='클라우드 보안(단위: 백만 달러)']]"}]