Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
cd2068d7
authored
2023-01-04 19:45:40 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix last pno
1 parent
7453129c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/common/fsm_econtract/retriever.py
src/common/fsm_econtract/retriever.py
View file @
cd2068d
...
...
@@ -195,7 +195,9 @@ class Retriever:
pdf_result
=
dict
()
for
pno_str
,
fields_dict
in
self
.
target_fields
.
items
():
is_last_pno
=
False
if
pno_str
==
'-1'
:
is_last_pno
=
True
pno_int_list
=
[
int
(
pno_str
)
for
pno_str
in
pdf_text_list
.
keys
()]
pno_str
=
str
(
max
(
pno_int_list
))
...
...
@@ -248,6 +250,7 @@ class Retriever:
self
.
position_str
:
list
(
coordinates
),
}
pdf_result
[
'page_{0}'
.
format
(
int
(
pno_str
)
+
1
)]
=
page_result
page_key
=
'page_12'
if
is_last_pno
else
'page_{0}'
.
format
(
int
(
pno_str
)
+
1
)
pdf_result
[
page_key
]
=
page_result
return
pdf_result
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment