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
da4982cf
authored
2022-04-15 18:10:58 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
SE logic modify part2
1 parent
1a89d0da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
src/common/tools/comparison.py
src/common/tools/comparison.py
View file @
da4982c
...
...
@@ -183,6 +183,16 @@ class Comparison:
def
se_date_contain_compare
(
self
,
input_str
,
ocr_str_or_list
,
**
kwargs
):
return
self
.
RESULT_Y
@staticmethod
def
amount_fix
(
src_str
):
replace_char_list
=
[]
for
idx
in
range
(
len
(
src_str
)):
if
src_str
[
idx
]
.
isdigit
():
replace_char_list
.
append
(
src_str
[
idx
])
elif
idx
==
len
(
src_str
)
-
3
and
src_str
[
idx
]
==
'.'
:
replace_char_list
.
append
(
src_str
[
idx
])
return
''
.
join
(
replace_char_list
)
def
se_schedule_compare
(
self
,
input_str
,
ocr_str_or_list
,
**
kwargs
):
if
isinstance
(
ocr_str_or_list
,
list
):
if
len
(
ocr_str_or_list
)
>
0
:
...
...
@@ -192,7 +202,8 @@ class Comparison:
tmp_str
=
"{1}{0}{2}"
.
format
(
self
.
SPLIT_STR
,
row_list
[
0
]
.
replace
(
'.'
,
''
),
row_list
[
kwargs
.
get
(
'value_idx'
,
1
)]
.
replace
(
','
,
''
))
# 优化还款计划表页,小数点只存在与还款金额的倒数第三位。
self
.
amount_fix
(
row_list
[
kwargs
.
get
(
'value_idx'
,
1
)]))
schedule_list
.
append
(
tmp_str
)
return
self
.
build_res
(
self
.
SCHEDULE_SPLIT_STR
.
join
(
schedule_list
)
==
input_str
)
else
:
...
...
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