Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
bom_identify
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0ca4aa9a
authored
Jun 05, 2020
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branches 'dev' and 'master' of
http://119.23.72.7/lic/bom_identify
parents
a7896917
86fecc50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
predict/base_handler.py
predict/base_handler.py
View file @
0ca4aa9a
...
@@ -75,7 +75,13 @@ class BasePredictor:
...
@@ -75,7 +75,13 @@ class BasePredictor:
else
:
else
:
return
False
return
False
collect_num
=
[
kw
for
kw
in
data
if
isinstance
(
kw
,
int
)
or
isinstance
(
kw
,
float
)
or
isNumberCol
(
str
(
kw
))]
collect_num
=
[]
for
kw
in
data
:
if
isinstance
(
kw
,
int
)
or
isinstance
(
kw
,
float
)
or
isNumberCol
(
str
(
kw
)):
if
str
(
kw
)[:
1
]
==
'0'
:
return
False
collect_num
.
append
(
kw
)
rate
=
round
(
len
(
collect_num
)
/
len
(
data
),
3
)
rate
=
round
(
len
(
collect_num
)
/
len
(
data
),
3
)
return
True
if
rate
>=
RIGHT_LEVEL
else
False
return
True
if
rate
>=
RIGHT_LEVEL
else
False
...
...
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