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
21cab0c8
authored
2021-06-08 17:25:17 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add capital ignore
1 parent
2b3cb38c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
src/celery_compare/tasks.py
src/celery_compare/tasks.py
View file @
21cab0c
...
...
@@ -36,7 +36,8 @@ def do_not_compare(info_dict, compare_list):
del
info_dict
[
compare_tuple
[
0
]]
def
field_compare
(
info_dict
,
ocr_res_dict
,
ocr_field
,
compare_list
,
res_set
,
has_expiry_date
=
False
,
sep_name
=
None
):
def
field_compare
(
info_dict
,
ocr_res_dict
,
ocr_field
,
compare_list
,
res_set
,
has_expiry_date
=
False
,
sep_name
=
None
,
capital_ignore
=
False
):
is_find
=
False
ocr_res_str
=
ocr_res_dict
.
get
(
ocr_field
)
if
ocr_res_str
is
not
None
:
...
...
@@ -98,7 +99,8 @@ def field_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_set, has
del
info_dict
[
compare_tuple
[
0
]]
else
:
info_dict
[
compare_tuple
[
0
]]
=
ocr_output
res_set
.
add
(
compare_res
)
if
not
capital_ignore
or
idx
!=
1
:
res_set
.
add
(
compare_res
)
if
not
is_find
:
res_set
.
add
(
consts
.
RESULT_N
)
for
compare_tuple
in
compare_list
:
...
...
@@ -257,8 +259,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
# sep营业执照
if
cus_type
==
consts
.
CUSTOMER_TYPE
[
5
]:
field_compare
(
order_individual_cus_info
,
ocr_res_dict
,
consts
.
BL_OCR_FIELD
,
consts
.
TCSEP
,
res_set
,
sep_name
=
sep_name
)
# field_compare(order_individual_cus_info, ocr_res_dict, consts.BL_OCR_FIELD, consts.TCSEP, res_set)
sep_name
=
sep_name
,
capital_ignore
=
True
)
order_individual_cus_info_list
.
append
(
order_individual_cus_info
)
...
...
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