2506회 정기 채점결과
This commit is contained in:
@@ -41,7 +41,7 @@ def copy_dic_subdirs(source_root, target_root_a, target_root_b, target_root_c, t
|
||||
# 사용법
|
||||
# exam_round = "2504_2"
|
||||
exam_round = "2506"
|
||||
source_directory = r"C:\Users\dra\project\HWP\HWP-Scoring\회차별채점자료\2506\hwp_정답"
|
||||
source_directory = r"C:\Users\dra\project\data\제2506회 정기\답안파일\제2506회 디지털정보활용능력 답안파일"
|
||||
|
||||
target_directory_a = f".\\input\\{exam_round}\\A" # '1교시'의 타겟 경로
|
||||
target_directory_b = f".\\input\\{exam_round}\\B" # '2교시'의 타겟 경로
|
||||
|
||||
@@ -159,17 +159,16 @@ def delete_gen_py():
|
||||
print(f'{gen_py_dir} 디렉토리를 삭제했습니다.')
|
||||
|
||||
if __name__ == "__main__":
|
||||
delete_gen_py()
|
||||
|
||||
# 로깅 설정
|
||||
setup_logging()
|
||||
|
||||
exam_rounds = [
|
||||
# "2506_3",
|
||||
"2506"
|
||||
]
|
||||
|
||||
delete_gen_py()
|
||||
|
||||
# 로깅 설정
|
||||
setup_logging()
|
||||
|
||||
# 변환할 폴더 경로 설정
|
||||
# 배열 동시에 변환하면 에러발생 -> 하나씩 변환 -> time.sleep(0.5) 추가
|
||||
for exam_round in exam_rounds:
|
||||
@@ -180,7 +179,10 @@ if __name__ == "__main__":
|
||||
(f"C:\\Users\\dra\\project\\HWP\\HWP-Scoring\\input\\{exam_round}\\D\\DIW",f"C:\\Users\\dra\\project\\HWP\\HWP-Scoring\\output\\{exam_round}\\D\\DIW"),
|
||||
(f"C:\\Users\\dra\\project\\HWP\\HWP-Scoring\\input\\{exam_round}\\E\\DIW",f"C:\\Users\\dra\\project\\HWP\\HWP-Scoring\\output\\{exam_round}\\E\\DIW"),
|
||||
]
|
||||
|
||||
|
||||
# folders = [
|
||||
# (f"C:\\Users\\dra\\project\\HWP\\HWP-Scoring\\input\\{exam_round}\\C\\TEST",f"C:\\Users\\dra\\project\\HWP\\HWP-Scoring\\output\\{exam_round}\\C\\TEST")]
|
||||
|
||||
# 변환 실행
|
||||
for input, output in folders:
|
||||
try:
|
||||
|
||||
@@ -156,9 +156,9 @@
|
||||
"item": "문구 (2025년 7월부터 생활가전수거 캠페인을 시행)/② UNDERLINE"
|
||||
},
|
||||
"14": {
|
||||
"path": "//CHAR[contains(text(),'{char1}')]",
|
||||
"path2": "//CHAR[contains(text(),'{char2}')]",
|
||||
"path3": "//CHAR[contains(text(),'{char3}')]",
|
||||
"path": "//CHAR[contains(string(.),'{char1}')]/text()",
|
||||
"path2": "//CHAR[contains(string(.),'{char2}')]/text()",
|
||||
"path3": "//CHAR[contains(string(.),'{char3}')]/text()",
|
||||
"char1": "●",
|
||||
"char2": "●",
|
||||
"char3": "※",
|
||||
@@ -445,10 +445,10 @@
|
||||
},
|
||||
"15": {
|
||||
"path": "//PICTURE[./IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]]/SHAPEOBJECT/SIZE/@Width",
|
||||
"value": "85",
|
||||
"value": "80",
|
||||
"points": 2,
|
||||
"category": "mmSize",
|
||||
"item": "② 크기-너비 (85 mm)"
|
||||
"item": "② 크기-너비 (80 mm)"
|
||||
},
|
||||
"16": {
|
||||
"path": "//PICTURE[./IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]]/SHAPEOBJECT/SIZE/@Height",
|
||||
|
||||
@@ -156,9 +156,9 @@
|
||||
"item": "문구 (동물병원이나 펫샵, 동물등록대행업체에서)/② UNDERLINE"
|
||||
},
|
||||
"14": {
|
||||
"path": "//CHAR[contains(text(),'{char1}')]",
|
||||
"path2": "//CHAR[contains(text(),'{char2}')]",
|
||||
"path3": "//CHAR[contains(text(),'{char3}')]",
|
||||
"path": "//CHAR[contains(string(.),'{char1}')]/text()",
|
||||
"path2": "//CHAR[contains(string(.),'{char2}')]/text()",
|
||||
"path3": "//CHAR[contains(string(.),'{char3}')]/text()",
|
||||
"char1": "★",
|
||||
"char2": "★",
|
||||
"char3": "※",
|
||||
|
||||
@@ -156,9 +156,9 @@
|
||||
"item": "문구 (구직자와 기업 간의 효과적인 매칭)/② ITALIC"
|
||||
},
|
||||
"14": {
|
||||
"path": "//CHAR[contains(text(),'{char1}')]",
|
||||
"path2": "//CHAR[contains(text(),'{char2}')]",
|
||||
"path3": "//CHAR[contains(text(),'{char3}')]",
|
||||
"path": "//CHAR[contains(string(.),'{char1}')]/text()",
|
||||
"path2": "//CHAR[contains(string(.),'{char2}')]/text()",
|
||||
"path3": "//CHAR[contains(string(.),'{char3}')]/text()",
|
||||
"char1": "◈",
|
||||
"char2": "◈",
|
||||
"char3": "※",
|
||||
|
||||
@@ -156,9 +156,9 @@
|
||||
"item": "문구 (태국의 아름다운 문화와 함께 잊지 못할 추억을 만들어보세요!)/② ITALIC"
|
||||
},
|
||||
"14": {
|
||||
"path": "//CHAR[contains(text(),'{char1}')]",
|
||||
"path2": "//CHAR[contains(text(),'{char2}')]",
|
||||
"path3": "//CHAR[contains(text(),'{char3}')]",
|
||||
"path": "//CHAR[contains(string(.),'{char1}')]/text()",
|
||||
"path2": "//CHAR[contains(string(.),'{char2}')]/text()",
|
||||
"path3": "//CHAR[contains(string(.),'{char3}')]/text()",
|
||||
"char1": "◇",
|
||||
"char2": "◇",
|
||||
"char3": "※",
|
||||
@@ -682,10 +682,10 @@
|
||||
},
|
||||
"42": {
|
||||
"path": "//CHARSHAPE[@Id=//TABLE//TEXT/@CharShape]/@Height",
|
||||
"value": "1000",
|
||||
"value": "1100",
|
||||
"points": 1,
|
||||
"category": "TableAnswer",
|
||||
"item": "글자모양/② 크기 (1000)"
|
||||
"item": "글자모양/② 크기 (1100)"
|
||||
},
|
||||
"43": {
|
||||
"path": "//PARASHAPE[@Id=//TABLE/ROW//P/@ParaShape]/@Align",
|
||||
|
||||
@@ -366,17 +366,16 @@
|
||||
"item": "문구 (골프)/② 크기-높이 (12 mm)"
|
||||
},
|
||||
"6": {
|
||||
"path": "//RECTANGLE[.//CHAR[text()='{searchValue}']]//LINESHAPE/@Style",
|
||||
"path2": "//RECTANGLE[.//CHAR[text()='{searchValue}']]//LINESHAPE/@Width",
|
||||
"path": "//RECTANGLE[.//CHAR[text()='{searchValue}']]//LINESHAPE",
|
||||
"searchValue": "골프",
|
||||
"value": [
|
||||
"DoubleSlim",
|
||||
"283"
|
||||
],
|
||||
"value": {
|
||||
"Style": "DoubleSlim",
|
||||
"Width": "283"
|
||||
},
|
||||
"points": 2,
|
||||
"category": "DoubleAnswer",
|
||||
"category": "LineShape",
|
||||
"item": "문구 (골프)/③ 테두리 : 이중 실선(1.00mm)",
|
||||
"desc": "1mm = 283pt value값은 283pt로 입력"
|
||||
"desc": "1mm = 283pt value['Width']에 pt값 입력"
|
||||
},
|
||||
"7": {
|
||||
"path": "//RECTANGLE[.//CHAR[text()='{searchValue}']]/@Ratio",
|
||||
@@ -437,8 +436,7 @@
|
||||
"item": "문구 (골프)/⑩ 정렬 (가운데 정렬)"
|
||||
},
|
||||
"14": {
|
||||
"path": "boolean(//PICTURE//SHAPECOMMENT[contains(text(),'{searchValue}')])",
|
||||
"searchValue": "원본 그림의 이름: 그림",
|
||||
"path": "//BINITEM[@BinData=//PICTURE/IMAGE/@BinItem][@Format='JPG']",
|
||||
"value": true,
|
||||
"points": 2,
|
||||
"category": "Boolean",
|
||||
|
||||
@@ -742,33 +742,35 @@ class XMLScorer:
|
||||
xpath = xpath.replace('{char1}', ch1)
|
||||
xpath2 = xpath2.replace('{char2}', ch2)
|
||||
xpath3 = xpath3.replace('{char3}', ch3)
|
||||
char1_ele = root.xpath(xpath)
|
||||
char2_ele = root.xpath(xpath2)
|
||||
char3_ele = root.xpath(xpath3)
|
||||
ch1_str = root.xpath(xpath)
|
||||
ch2_str = root.xpath(xpath2)
|
||||
ch3_str = root.xpath(xpath3)
|
||||
sum_char = 0
|
||||
|
||||
# char1 요소에서 특수문자 갯수 세기 (최대 2점)
|
||||
for item in char1_ele or []:
|
||||
count_char1 = item.text.count(ch1)
|
||||
sum_char += count_char1
|
||||
for text in ch1_str or []:
|
||||
ch1_count = text.count(ch1)
|
||||
sum_char += ch1_count
|
||||
if sum_char >= 2:
|
||||
sum_char = 2
|
||||
break
|
||||
|
||||
# char2 요소에서 특수문자 갯수 세기 (최대 1점)
|
||||
# char1과 char2가 다른 경우 (예: ▶ 행사안내 ◀)
|
||||
if (ch1 != ch2) and char2_ele:
|
||||
count_char2 = char2_ele[0].text.count(ch2)
|
||||
if count_char2 > 1:
|
||||
count_char2 = 1
|
||||
sum_char += count_char2
|
||||
if (ch1 != ch2) and ch2_str:
|
||||
for text in ch2_str or []:
|
||||
ch2_count = text.count(ch2)
|
||||
if ch2_count > 1:
|
||||
ch2_count = 1
|
||||
sum_char += ch2_count
|
||||
|
||||
# char2 요소에서 특수문자 갯수 세기 (최대 1점)
|
||||
if char3_ele:
|
||||
count_char3 = char3_ele[0].text.count(ch3)
|
||||
if count_char3 > 1:
|
||||
count_char3 = 1
|
||||
sum_char += count_char3
|
||||
# char3 요소에서 특수문자 갯수 세기 (최대 1점)
|
||||
if ch3_str:
|
||||
for text in ch3_str or []:
|
||||
ch3_count = text.count(ch3)
|
||||
if ch3_count > 1:
|
||||
ch3_count = 1
|
||||
sum_char += ch3_count
|
||||
|
||||
user_answer = sum_char
|
||||
|
||||
@@ -1224,7 +1226,7 @@ def main():
|
||||
|
||||
# 시험회차 및 유형
|
||||
exam_round = '2506'
|
||||
# exam_round = '2506_3'
|
||||
# exam_round = '2506_5'
|
||||
|
||||
# 채점하고자 하는 유형은 주석 해제
|
||||
exam_types = [
|
||||
|
||||
1141
hwp_conversion.log
1141
hwp_conversion.log
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
||||
[{"kind":2,"language":"xpath","value":"//a:t[text()='클라우드 보안투자']/ancestor::a:r//a:ea/@typeface"},{"kind":2,"language":"xpath","value":"boolean(//FONTFACE[@Lang='Hangul']/FONT[@Id=//CHARSHAPE/FONTID/@Hangul]/@Name='바탕' and //CHARSHAPE/@Height='1000' and //PARASHAPE/PARAMARGIN/@LineSpacing='160' and //PARASHAPE/@Align='Justify')"},{"kind":2,"language":"xpath","value":"//FONTFACE[@Lang='Hangul']/FONT[@Id=//CHARSHAPE/FONTID/@Hangul]/@Name='바탕'"},{"kind":2,"language":"xpath","value":"//FONTFACE[@Lang='Hangul']/FONT[@Id=//CHARSHAPE/FONTID/@Hangul]/@Name='바탕' and //CHARSHAPE/@Height='1000' and //PARASHAPE/PARAMARGIN/@LineSpacing='160' and //PARASHAPE/@Align='Justify')"},{"kind":2,"language":"xpath","value":"//TEXT[CHAR[text()='태']]/@CharShape"},{"kind":2,"language":"xpath","value":"//PICTURE/IMAGE/@BinItem"},{"kind":2,"language":"xpath","value":"//BINITEM[@BinData=//PICTURE/IMAGE/@BinItem][@Format=\"JPG\"]"},{"kind":2,"language":"xpath","value":"//P[.//FIELDBEGIN[@Type='Hyperlink'] and .//CHAR[contains(., 'http')]]"},{"kind":2,"language":"xpath","value":"//PICTURE[./IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]]/SHAPEOBJECT/POSITION[not(@TreatAsChar='true')]/@HorzOffset"},{"kind":2,"language":"xpath","value":"//P//COLDEF/@Count"},{"kind":2,"language":"xpath","value":"//P[.//BOOKMARK/@Name=\"Page_2_start\"]"}]
|
||||
[{"kind":2,"language":"xpath","value":"//a:t[text()='클라우드 보안투자']/ancestor::a:r//a:ea/@typeface"},{"kind":2,"language":"xpath","value":"boolean(//FONTFACE[@Lang='Hangul']/FONT[@Id=//CHARSHAPE/FONTID/@Hangul]/@Name='바탕' and //CHARSHAPE/@Height='1000' and //PARASHAPE/PARAMARGIN/@LineSpacing='160' and //PARASHAPE/@Align='Justify')"},{"kind":2,"language":"xpath","value":"//FONTFACE[@Lang='Hangul']/FONT[@Id=//CHARSHAPE/FONTID/@Hangul]/@Name='바탕'"},{"kind":2,"language":"xpath","value":"//FONTFACE[@Lang='Hangul']/FONT[@Id=//CHARSHAPE/FONTID/@Hangul]/@Name='바탕' and //CHARSHAPE/@Height='1000' and //PARASHAPE/PARAMARGIN/@LineSpacing='160' and //PARASHAPE/@Align='Justify')"},{"kind":2,"language":"xpath","value":"//TEXT[CHAR[text()='태']]/@CharShape"},{"kind":2,"language":"xpath","value":"//PICTURE/IMAGE/@BinItem"},{"kind":2,"language":"xpath","value":"//BINITEM[@BinData=//PICTURE/IMAGE/@BinItem][@Format=\"JPG\"]"},{"kind":2,"language":"xpath","value":"//P[.//FIELDBEGIN[@Type='Hyperlink'] and .//CHAR[contains(., 'http')]]"},{"kind":2,"language":"xpath","value":"//PICTURE[./IMAGE[@BinItem=//BINITEM[@Format='JPG']/@BinData]]/SHAPEOBJECT/POSITION[not(@TreatAsChar='true')]/@HorzOffset"},{"kind":2,"language":"xpath","value":"//CHAR[contains(string(.), '※')]/descendant-or-self::text()"},{"kind":2,"language":"xpath","value":"//P[@ParaShape=\"17\"]/TEXT[@CharShape='7']//CHAR[string(.)]"},{"kind":2,"language":"xpath","value":"//CHAR[contains(string(.), '기타')]/text()"}]
|
||||
BIN
회차별채점자료/2506/excel_채점결과/250703_DIW_2506A_채점결과.xlsx
Normal file
BIN
회차별채점자료/2506/excel_채점결과/250703_DIW_2506A_채점결과.xlsx
Normal file
Binary file not shown.
BIN
회차별채점자료/2506/excel_채점결과/250704_DIW_2506A_채점결과.xlsx
Normal file
BIN
회차별채점자료/2506/excel_채점결과/250704_DIW_2506A_채점결과.xlsx
Normal file
Binary file not shown.
BIN
회차별채점자료/2506/excel_채점결과/250704_DIW_2506B_채점결과.xlsx
Normal file
BIN
회차별채점자료/2506/excel_채점결과/250704_DIW_2506B_채점결과.xlsx
Normal file
Binary file not shown.
BIN
회차별채점자료/2506/excel_채점결과/250704_DIW_2506C_채점결과.xlsx
Normal file
BIN
회차별채점자료/2506/excel_채점결과/250704_DIW_2506C_채점결과.xlsx
Normal file
Binary file not shown.
BIN
회차별채점자료/2506/excel_채점결과/250704_DIW_2506D_채점결과.xlsx
Normal file
BIN
회차별채점자료/2506/excel_채점결과/250704_DIW_2506D_채점결과.xlsx
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
회차별채점자료/2506_5/excel_채점결과/250703_DIW_2506_5A_채점결과.xlsx
Normal file
BIN
회차별채점자료/2506_5/excel_채점결과/250703_DIW_2506_5A_채점결과.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user