解决部分华为设备类型错误

This commit is contained in:
anyongjin
2023-02-20 16:14:18 +08:00
parent eb4a337a5f
commit cff3ce4204
5 changed files with 17 additions and 13 deletions

View File

@@ -285,6 +285,8 @@ def sync_brands(name: str):
if __name__ == '__main__':
fnames = os.listdir(source_dir)
for name in fnames:
# if name.endswith('_en.md'):
# continue
print(f'process: {name}')
sync_brands(name)
df = pd.DataFrame(pd_rows, columns=pd_cols)

View File

@@ -2208,16 +2208,16 @@ HD55KANY,tv,huawei,华为,,,华为智慧屏 B 系列,#5-510
HD65KANY,tv,huawei,华为,,,华为智慧屏 B 系列,#5-610
HEGE-550AX,tv,huawei,华为,,,华为智慧屏 B 系列,#7-500
HEGE-550X,tv,huawei,华为,,,华为智慧屏 B 系列,#7-510
BLM-00,tv,huawei,华为,,,华为小精灵学习智慧屏,#
HUAWEI U9500,tv,huawei,华为,,,华为 Ascend D1,#
HUAWEI U9500E,tv,huawei,华为,,,华为 Ascend D1,#XL
HUAWEI U9510,tv,huawei,华为,,,华为 Ascend D1,#四核
HUAWEI U9510E,tv,huawei,华为,,,华为 Ascend D1,#四核 XL
HUAWEI T9510E,tv,huawei,华为,,,华为 Ascend D1,#四核 XL 移动版
HUAWEI D2-5000,tv,huawei,华为,,,华为 Ascend D2,#移动 3G 版
HUAWEI D2-6070,tv,huawei,华为,,,华为 Ascend D2,#移动 4G 版
HUAWEI D2-0082,tv,huawei,华为,,,华为 Ascend D2,#联通版
HUAWEI D2-2010,tv,huawei,华为,,,华为 Ascend D2,#电信版
BLM-00,tv,huawei,华为,,,华为小精灵学习智慧屏(Pad),#
HUAWEI U9500,mob,huawei,华为,,,华为 Ascend D1,#
HUAWEI U9500E,mob,huawei,华为,,,华为 Ascend D1,#XL
HUAWEI U9510,mob,huawei,华为,,,华为 Ascend D1,#四核
HUAWEI U9510E,mob,huawei,华为,,,华为 Ascend D1,#四核 XL
HUAWEI T9510E,mob,huawei,华为,,,华为 Ascend D1,#四核 XL 移动版
HUAWEI D2-5000,mob,huawei,华为,,,华为 Ascend D2,#移动 3G 版
HUAWEI D2-6070,mob,huawei,华为,,,华为 Ascend D2,#移动 4G 版
HUAWEI D2-0082,mob,huawei,华为,,,华为 Ascend D2,#联通版
HUAWEI D2-2010,mob,huawei,华为,,,华为 Ascend D2,#电信版
MT7-L09,mob,huawei,HUAWEI,,Jazz,HUAWEI Ascend Mate 7,#Single SIM
MT7-TL10,mob,huawei,HUAWEI,,Jazz,HUAWEI Ascend Mate 7,#Dual SIM
CRR-L09,mob,huawei,HUAWEI,,Carrera,HUAWEI Mate S,#Single SIM
1 model dtype brand brand_title code code_alias model_name ver_name
2208 HD65KANY tv huawei 华为 华为智慧屏 B 系列 #5-610
2209 HEGE-550AX tv huawei 华为 华为智慧屏 B 系列 #7-500
2210 HEGE-550X tv huawei 华为 华为智慧屏 B 系列 #7-510
2211 BLM-00 tv huawei 华为 华为小精灵学习智慧屏 华为小精灵学习智慧屏(Pad) #
2212 HUAWEI U9500 tv mob huawei 华为 华为 Ascend D1 #
2213 HUAWEI U9500E tv mob huawei 华为 华为 Ascend D1 #XL
2214 HUAWEI U9510 tv mob huawei 华为 华为 Ascend D1 #四核
2215 HUAWEI U9510E tv mob huawei 华为 华为 Ascend D1 #四核 XL
2216 HUAWEI T9510E tv mob huawei 华为 华为 Ascend D1 #四核 XL 移动版
2217 HUAWEI D2-5000 tv mob huawei 华为 华为 Ascend D2 #移动 3G 版
2218 HUAWEI D2-6070 tv mob huawei 华为 华为 Ascend D2 #移动 4G 版
2219 HUAWEI D2-0082 tv mob huawei 华为 华为 Ascend D2 #联通版
2220 HUAWEI D2-2010 tv mob huawei 华为 华为 Ascend D2 #电信版
2221 MT7-L09 mob huawei HUAWEI Jazz HUAWEI Ascend Mate 7 #Single SIM
2222 MT7-TL10 mob huawei HUAWEI Jazz HUAWEI Ascend Mate 7 #Dual SIM
2223 CRR-L09 mob huawei HUAWEI Carrera HUAWEI Mate S #Single SIM

View File

@@ -8,7 +8,7 @@
**设备类型(device_type)**
包含手机、手表、平板、电视、电视盒子、笔记本、pod等
对应csv的值mob,watch,pad,tv,tv_hub,computer,pod
会从一级标题、二级标题、加粗行中尝试提取
会从一级标题、二级标题、加粗行中尝试提取。如果一级标题不存在则置为空,如果有多个二级标题,后面的二级标题(或加粗行)未检测到有效设备类型,会使用前面的设备类型。
**品牌代码(brand)**
从brands目录下的文件名中提取第一个单词
**品牌名(brand_title)**
@@ -25,3 +25,4 @@
有些版本名称可能没有完全包含model_name而是只包含其中一部分还有些可能完全没包含model_name
输出ver_name中如果包含model_name然后去掉了一部分则规定以"#"开头。
如果有多个model_name且包含的不是第1个则"#"前面会添加索引
例如"CPH2413"对应"一加 10T 印度版",但所属的型号是"一加 Ace Pro / 一加 10T",有两个,和第二个型号相同,所以版本中去掉相同的"一加 10T"部分,变成"#印度版"又因为对应的型号是第二个索引是1故最后是"1#印度版"