2505회 JSON채점기준표 및 채점자료 업데이트
This commit is contained in:
@@ -339,16 +339,17 @@ class XMLScorer:
|
||||
# 가로 차트일 경우에만 x축과 y축을 바꿔줌
|
||||
# 세로, 꺾은선, 원형 차트의 경우 그대로 사용
|
||||
if "가로" in chart_type:
|
||||
chart_xpath = chart_xpath.replace("catAx", "valAx")
|
||||
chart_xpath = chart_xpath.replace("valAx", "catAx")
|
||||
|
||||
|
||||
if "catAx" in chart_xpath:
|
||||
chart_xpath = chart_xpath.replace("catAx", "valAx")
|
||||
if "valAx" in chart_xpath:
|
||||
chart_xpath = chart_xpath.replace("valAx", "catAx")
|
||||
|
||||
chart_items = chart_tree.xpath(chart_xpath, namespaces=namespaces) if chart_xpath else []
|
||||
|
||||
for item in chain(items, items2, chart_items):
|
||||
user_answer = item
|
||||
|
||||
user_answer = item.replace(" ", "") if isinstance(item, str) else item
|
||||
right_answer = right_answer.replace(" ", "")
|
||||
|
||||
self.evaluate_answer(scoring, user_answer, right_answer, points)
|
||||
|
||||
if scoring['points'] > 0:
|
||||
@@ -475,11 +476,12 @@ class XMLScorer:
|
||||
continue
|
||||
|
||||
font_name = root.xpath(f"//FONTFACE[@Lang='Hangul']/FONT[@Id='{font_id[0]}']/@Name")
|
||||
|
||||
if not font_name:
|
||||
all_match = False
|
||||
continue
|
||||
|
||||
user_answer = font_name[0]
|
||||
user_answer = font_name[0].replace(" ", "") # 공백 제거
|
||||
|
||||
# 접두어 제거
|
||||
if right_answer in ["견고딕", "중고딕"]:
|
||||
@@ -508,18 +510,22 @@ class XMLScorer:
|
||||
|
||||
# hyperlink가 아닌 경우(일반적인 텍스트 일 경우)
|
||||
if not has_hyperlink_ptag:
|
||||
charshape = root.xpath(xpath)
|
||||
if not charshape:
|
||||
charshape_list = root.xpath(xpath)
|
||||
if not charshape_list:
|
||||
charshape = None
|
||||
user_answer = None
|
||||
else:
|
||||
font_attribute = charshape[0].find(right_answer)
|
||||
if font_attribute is not None:
|
||||
user_answer = font_attribute.tag
|
||||
else:
|
||||
user_answer = None
|
||||
for charshape in charshape_list:
|
||||
font_attribute = charshape.find(right_answer)
|
||||
if font_attribute is not None:
|
||||
user_answer = font_attribute.tag
|
||||
else:
|
||||
user_answer = None
|
||||
|
||||
self.evaluate_answer(scoring, user_answer, right_answer, points, method="equal")
|
||||
self.evaluate_answer(scoring, user_answer, right_answer, points, method="equal")
|
||||
|
||||
if scoring['points'] > 0:
|
||||
break
|
||||
|
||||
# 하이퍼링크인 경우
|
||||
elif has_hyperlink_ptag:
|
||||
@@ -709,7 +715,9 @@ class XMLScorer:
|
||||
chart_type_list = {
|
||||
'꺾은선형': "//c:lineChart[c:grouping[@val='standard']]",
|
||||
'묶은가로막대형': "//c:barChart[c:barDir[@val='bar'] and c:grouping[@val='clustered']]",
|
||||
'누적가로막대형': "//c:barChart[c:barDir[@val='bar'] and c:grouping[@val='stacked']]",
|
||||
'묶은세로막대형': "//c:barChart[c:barDir[@val='col'] and c:grouping[@val='clustered']]",
|
||||
'누적세로막대형': "//c:barChart[c:barDir[@val='col'] and c:grouping[@val='stacked']]",
|
||||
'원형': "//c:pieChart",
|
||||
'분산형': "//c:scatterChart"
|
||||
}
|
||||
@@ -1024,17 +1032,18 @@ class XMLScorer:
|
||||
def main():
|
||||
|
||||
# 시험회차 및 유형
|
||||
exam_round = '2504'
|
||||
exam_round = '2505'
|
||||
|
||||
# 채점하고자 하는 유형은 주석 해제
|
||||
exam_types = [
|
||||
'A',
|
||||
'B',
|
||||
'C',
|
||||
# 'A',
|
||||
# 'B',
|
||||
# 'C',
|
||||
'D',
|
||||
]
|
||||
|
||||
test_mode = False
|
||||
# test_mode = True #/TEST 폴더 채점시
|
||||
# test_mode = False
|
||||
test_mode = True #/TEST 폴더 채점시
|
||||
|
||||
output_excel_paths = []
|
||||
for exam_type in exam_types:
|
||||
|
||||
Reference in New Issue
Block a user