[표 첫행 색상] 채점 기준 추가적용

This commit is contained in:
devdra9
2025-01-21 15:15:44 +09:00
parent 141d62cd74
commit c5fe09108c
4 changed files with 30 additions and 7 deletions

View File

@@ -1540,3 +1540,13 @@
2025-01-20 14:32:05,103 - INFO - 변환 성공: 워드(한글)-005179-손민준.hwp -> 워드(한글)-005179-손민준.hml
2025-01-20 14:32:05,346 - INFO - 변환 성공: 워드(한글)-005180-도정원.hwp -> 워드(한글)-005180-도정원.hml
2025-01-20 14:32:07,797 - INFO - 변환 성공: 정답.hwp -> 정답.hml
2025-01-21 14:12:50,256 - INFO - 변환 성공: 워드(한글)-005172-김서인.hwp -> 워드(한글)-005172-김서인.hml
2025-01-21 14:12:50,657 - INFO - 변환 성공: 워드(한글)-005174-지율.hwp -> 워드(한글)-005174-지율.hml
2025-01-21 14:12:50,932 - INFO - 변환 성공: 워드(한글)-005175-문지환.hwp -> 워드(한글)-005175-문지환.hml
2025-01-21 14:12:51,261 - INFO - 변환 성공: 워드(한글)-005176-이세영.hwp -> 워드(한글)-005176-이세영.hml
2025-01-21 14:12:51,576 - INFO - 변환 성공: 워드(한글)-005177-김은유.hwp -> 워드(한글)-005177-김은유.hml
2025-01-21 14:12:51,793 - INFO - 변환 성공: 워드(한글)-005179-손민준.hwp -> 워드(한글)-005179-손민준.hml
2025-01-21 14:12:52,026 - INFO - 변환 성공: 워드(한글)-005180-도정원.hwp -> 워드(한글)-005180-도정원.hml
2025-01-21 14:12:52,245 - INFO - 변환 성공: 워드(한글)-005416-김민서.hwp -> 워드(한글)-005416-김민서.hml
2025-01-21 14:12:52,486 - INFO - 변환 성공: 워드(한글)-005605-김민서.hwp -> 워드(한글)-005605-김민서.hml
2025-01-21 14:12:52,811 - INFO - 변환 성공: 정답.hwp -> 정답.hml

View File

@@ -32,10 +32,13 @@ class XMLScorer:
first_xpath = args[0]
second_xpath = args[1]
points = args[2]
category = args[3]
if second_xpath is not None:
if ("특수문자" in category) and (second_xpath is not None):
try:
result = root.xpath(first_xpath)
# 결과값이 리스트형인데 내부에 정보가 없는경우
# 결과값이 없음
if type(result) is list and len(result) == 0:
return None
elif result < points:
@@ -46,12 +49,24 @@ class XMLScorer:
except ET.XPathEvalError as e:
return None
elif second_xpath is not None:
try:
# result = root.xpath(first_xpath)
result1 = root.xpath(first_xpath)
result2 = root.xpath(second_xpath)
if (type(result1) is list and len(result1) == 0) and (type(result2) is list and len(result2) == 0):
return None
return result1 if result1 else result2
except ET.XPathEvalError as e:
return None
else:
try:
result = root.xpath(first_xpath)
if type(result) is list and len(result) == 0:
return None
return result
except ET.XPathEvalError as e:
return None
@@ -175,7 +190,7 @@ class XMLScorer:
else:
xpath = xpath.replace('{searchValue}', simliar_text)
result = self.query_xml(root, xpath, xpath2, points)
result = self.query_xml(root, xpath, xpath2, points, category)
# [ boolean 타입 ]
# 1. 이텔릭체, 굵게, 밑줄 등 효과가 적용 여부에 따라
@@ -445,8 +460,6 @@ class XMLScorer:
typo_df = pd.DataFrame(typo_data).transpose()
# detail_df = pd.DataFrame(detail_data)
# detail_df.iloc[3] = typo_df.iloc[0]
# ExcelWriter 객체 생성
with pd.ExcelWriter(output_path, engine='openpyxl') as writer:

View File

@@ -559,7 +559,7 @@
},
"2-35":{
"path":"//BORDERFILL[@Id=//TABLE/ROW[1]/CELL/@BorderFill]/FILLBRUSH/WINDOWBRUSH/@FaceColor",
"path2": null,
"path2": "//BORDERFILL[@Id=//CELLZONE[@StartRowAddr='0' and @EndRowAddr='0' and @StartColAddr='0' and @EndColAddr='2']/@BorderFill]/FILLBRUSH/WINDOWBRUSH/@FaceColor",
"searchValue": null,
"value": "10966730",
"points": 2,

File diff suppressed because one or more lines are too long