Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
cc58f31d
Commit
cc58f31d
authored
Apr 15, 2024
by
quyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI yaml
parent
d0411ba9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
ocr_badcase.py
tools/ocr_badcase.py
+4
-4
text_badcase.py
tools/text_badcase.py
+4
-4
No files found.
tools/ocr_badcase.py
View file @
cc58f31d
...
@@ -768,14 +768,14 @@ def save_results(result_dict,overall_report_dict,badcase_path,overall_path,):
...
@@ -768,14 +768,14 @@ def save_results(result_dict,overall_report_dict,badcase_path,overall_path,):
with
open
(
badcase_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
badcase_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
# 将结果字典转换为JSON格式并写入文件
# 将结果字典转换为JSON格式并写入文件
json
.
dump
(
result_dict
,
f
,
ensure_ascii
=
False
,
indent
=
4
)
json
.
dump
(
result_dict
,
f
,
ensure_ascii
=
False
,
indent
=
4
)
badcase_path_res
=
"OCR抽取方案评测badcase输出报告查看:"
+
badcase_path
print
(
f
"OCR抽取方案评测badcase输出报告查看:{badcase_path}"
)
print
(
f
'
\033
[31m{badcase_path_res}
\033
[0m'
)
with
open
(
overall_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
overall_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
# 将结果字典转换为JSON格式并写入文件
# 将结果字典转换为JSON格式并写入文件
json
.
dump
(
overall_report_dict
,
f
,
ensure_ascii
=
False
,
indent
=
4
)
json
.
dump
(
overall_report_dict
,
f
,
ensure_ascii
=
False
,
indent
=
4
)
overall_path_res
=
"OCR抽取方案整体评测指标结果请查看:"
+
overall_path
print
(
f
"OCR抽取方案整体评测指标结果请查看:{overall_path}"
)
print
(
f
'
\033
[31m{overall_path_res}
\033
[0m'
)
def
upload_to_s3
(
file_path
,
bucket_name
,
s3_directory
,
AWS_ACCESS_KEY
,
AWS_SECRET_KEY
,
END_POINT_URL
):
def
upload_to_s3
(
file_path
,
bucket_name
,
s3_directory
,
AWS_ACCESS_KEY
,
AWS_SECRET_KEY
,
END_POINT_URL
):
"""
"""
...
...
tools/text_badcase.py
View file @
cc58f31d
...
@@ -780,14 +780,14 @@ def save_results(result_dict,overall_report_dict,badcase_path,overall_path,):
...
@@ -780,14 +780,14 @@ def save_results(result_dict,overall_report_dict,badcase_path,overall_path,):
with
open
(
badcase_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
badcase_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
# 将结果字典转换为JSON格式并写入文件
# 将结果字典转换为JSON格式并写入文件
json
.
dump
(
result_dict
,
f
,
ensure_ascii
=
False
,
indent
=
4
)
json
.
dump
(
result_dict
,
f
,
ensure_ascii
=
False
,
indent
=
4
)
badcase_path_res
=
"文本型PDF抽取方案评测badcase输出报告查看:"
+
badcase_path
print
(
f
"文本型PDF抽取方案评测badcase输出报告查看:{badcase_path}"
)
print
(
f
'
\033
[31m{badcase_path_res}
\033
[0m'
)
with
open
(
overall_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
with
open
(
overall_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
# 将结果字典转换为JSON格式并写入文件
# 将结果字典转换为JSON格式并写入文件
json
.
dump
(
overall_report_dict
,
f
,
ensure_ascii
=
False
,
indent
=
4
)
json
.
dump
(
overall_report_dict
,
f
,
ensure_ascii
=
False
,
indent
=
4
)
overall_path_res
=
"文本型PDF抽取方案整体评测指标结果请查看:"
+
overall_path
print
(
f
"文本型PDF抽取方案整体评测指标结果请查看:{overall_path}"
)
print
(
f
'
\033
[31m{overall_path_res}
\033
[0m'
)
def
upload_to_s3
(
file_path
,
bucket_name
,
s3_directory
,
AWS_ACCESS_KEY
,
AWS_SECRET_KEY
,
END_POINT_URL
):
def
upload_to_s3
(
file_path
,
bucket_name
,
s3_directory
,
AWS_ACCESS_KEY
,
AWS_SECRET_KEY
,
END_POINT_URL
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment