차트 xml파일 채점시 텍스트 유사도 미적용 수정

This commit is contained in:
devdra9
2025-01-23 15:38:18 +09:00
parent c19419efd4
commit c6f1a15e57
5 changed files with 896 additions and 133 deletions

View File

@@ -98,7 +98,12 @@ class XMLScorer:
# all_text = root.xpath(f"//CHAR/text()")
# all_text.append(root.xpath(f"//TEXTART/@text"))
all_text = root.xpath(f"//CHAR/text() | //TEXTART/@Text")
namespaces = {
'a': 'http://schemas.openxmlformats.org/drawingml/2006/main',
'c': 'http://schemas.openxmlformats.org/drawingml/2006/chart'
}
all_text = root.xpath(f"//BODY//text() | //TEXTART/@Text | //c:chart//text()", namespaces=namespaces)
# 유사도 비교
max_score = 0