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
347d06f2
authored
2021-06-07 15:41:48 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix registeredCapital
1 parent
357ac93f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
src/common/tools/comparison.py
src/common/tools/comparison.py
View file @
347d06f
import
re
from
datetime
import
datetime
#
from .rmb_lower import rmb_handler
from
.rmb_upper
import
to_rmb_upper
from
.rmb_lower
import
rmb_handler
#
from .rmb_upper import to_rmb_upper
class
Comparison
:
...
...
@@ -109,18 +109,18 @@ class Comparison:
if
ocr_str
==
''
or
ocr_str
.
strip
()
==
''
:
return
self
.
RESULT_NA
,
None
try
:
#
ocr_lower = rmb_handler.to_rmb_lower()
#
res = self.build_res(float(input_str) == ocr_lower)
input_rmb_upper
=
to_rmb_upper
(
float
(
input_str
))
res
=
self
.
build_res
(
input_rmb_upper
==
ocr_str
)
ocr_lower
=
rmb_handler
.
to_rmb_lower
()
res
=
self
.
build_res
(
float
(
input_str
)
==
ocr_lower
)
#
input_rmb_upper = to_rmb_upper(float(input_str))
#
res = self.build_res(input_rmb_upper == ocr_str)
except
Exception
as
e
:
return
self
.
RESULT_N
,
None
else
:
if
res
==
self
.
RESULT_Y
:
return
res
,
input_str
else
:
#
return res, ocr_lower
return
res
,
None
return
res
,
ocr_lower
#
return res, None
def
type_compare
(
self
,
input_str
,
ocr_str
,
idx
,
**
kwargs
):
if
not
isinstance
(
ocr_str
,
str
)
or
not
isinstance
(
input_str
,
str
):
...
...
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