|
@@ -50,7 +50,8 @@ def rule3_decorator(f, *args, **kwargs):
|
|
|
['患直质', '1.6克', '3%', '']
|
|
|
['脂扇', '1.1', '19%', '']
|
|
|
['碳水化合物', '勿18.2克', '6%', '']
|
|
|
-
|
|
|
+ ['能量.', '408千焦', '5%']
|
|
|
+ ['——精', '2.9克']
|
|
|
'''
|
|
|
predict_line = args[1]
|
|
|
predict_line = f(*args, **kwargs)
|
|
@@ -58,6 +59,8 @@ def rule3_decorator(f, *args, **kwargs):
|
|
|
predict_line = [re.sub('脂扇', '脂肪', s) for s in predict_line]
|
|
|
predict_line = [re.sub('勿(.*克)', '\\1', s) for s in predict_line]
|
|
|
predict_line = [re.sub('毫 克', '毫克', s) for s in predict_line]
|
|
|
+ predict_line = [re.sub('能量.', '能量', s) for s in predict_line]
|
|
|
+ predict_line = [re.sub('——精.', '——糖', s) for s in predict_line]
|
|
|
return predict_line
|
|
|
|
|
|
|