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
4b16924c
authored
Jun 03, 2020
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
static_confg添加带 * 字段
parent
884e0815
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
predict/dict_predict.py
static_config.py
predict/dict_predict.py
View file @
4b16924c
...
@@ -38,7 +38,6 @@ class DicPredict(BasePredictor):
...
@@ -38,7 +38,6 @@ class DicPredict(BasePredictor):
if
field
.
lower
()
in
STD_FIELDS_MAP
[
k
]:
if
field
.
lower
()
in
STD_FIELDS_MAP
[
k
]:
dic
[
'std_name'
]
=
k
dic
[
'std_name'
]
=
k
li_res
.
append
(
dic
)
li_res
.
append
(
dic
)
return
li_res
return
li_res
def
head_predict
(
self
,
dict_data
):
def
head_predict
(
self
,
dict_data
):
...
...
static_config.py
View file @
4b16924c
...
@@ -2,8 +2,11 @@
...
@@ -2,8 +2,11 @@
# -*- coding:utf-8 -*-
# -*- coding:utf-8 -*-
# 可能的头部字段
# 可能的头部字段
PROB_FIELDS
=
[
"序号"
,
"名称"
,
"规格"
,
"MPN"
,
"用量(pcs)"
,
"用量"
,
"pcs"
,
"位号"
,
"描述"
,
"值"
,
"数量"
,
"封装"
,
"类别"
,
"a面位置"
,
"b面位置"
,
"备注"
,
PROB_FIELDS
=
[
"序号"
,
"名称"
,
"规格"
,
"MPN"
,
"用量(pcs)"
,
"用量"
,
"pcs"
,
"位号"
,
"描述"
,
"值"
,
"数量"
,
"封装"
,
"类别"
,
"a面位置"
,
"b面位置"
,
"备注"
,
"需求数量"
,
"售价"
,
"封装"
,
"封装规格"
,
'
*参数'
,
'*型号'
,
'*数量'
,
'*品牌'
,
"需求数量"
,
"售价"
,
"封装"
,
"封装规格"
,
'
型号'
,
'参数'
,
'数量'
,
'品牌'
,
'型号'
"参考品牌"
,
"品牌"
,
"item"
,
"厂商编码"
,
"品牌/厂商"
,
"参考料号"
,
"参考供应商"
,
"top面"
,
"bottom面"
]
"参考品牌"
,
"品牌"
,
"item"
,
"厂商编码"
,
"品牌/厂商"
,
"参考料号"
,
"参考供应商"
,
"top面"
,
"bottom面"
]
PROB_FIELDS_1
=
[
'*'
+
i
for
i
in
PROB_FIELDS
]
PROB_FIELDS
.
extend
(
PROB_FIELDS_1
)
# 标准名和代名词的映射
# 标准名和代名词的映射
STD_FIELDS_MAP
=
{
STD_FIELDS_MAP
=
{
...
...
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