Fix: enhance type check robustness with mixed String/Enum types
This commit is contained in:
parent
0d298cd5c9
commit
1bc77ddb22
1 changed files with 5 additions and 1 deletions
|
|
@ -849,7 +849,11 @@ class MinerUParser(RAGFlowPdfParser):
|
||||||
return
|
return
|
||||||
img_root = subdir / "generated_images"
|
img_root = subdir / "generated_images"
|
||||||
img_root.mkdir(parents=True, exist_ok=True)
|
img_root.mkdir(parents=True, exist_ok=True)
|
||||||
text_types = {"text", "list", "code", "header"}
|
text_types = {
|
||||||
|
"text", "list", "code", "header", "equation",
|
||||||
|
MinerUContentType.TEXT, MinerUContentType.LIST, MinerUContentType.CODE,
|
||||||
|
MinerUContentType.HEADER, MinerUContentType.EQUATION
|
||||||
|
}
|
||||||
generated = 0
|
generated = 0
|
||||||
for idx, item in enumerate(outputs):
|
for idx, item in enumerate(outputs):
|
||||||
if item.get("type") not in text_types:
|
if item.get("type") not in text_types:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue