|
@@ -155,7 +155,7 @@ CREATE TABLE botrecords (
|
|
|
codes = [i for i in map(lambda x: x.get("code"), answers)]
|
|
|
if "1.20" in codes or "1.10" in codes or "1.00" in codes or "1.30" in codes:
|
|
|
for answer in answers:
|
|
|
- if answer.get("code") in ["1.20", "1.10", "1.00", "1.30"]:
|
|
|
+ if answer.get("code") in ["1.20", "1.10", "1.00", "1.30", "98.00"]:
|
|
|
asr = answer.get("option", [{}])[-1].get("asr", '')
|
|
|
code = answer.get("code")
|
|
|
opt = answer.get("option", {})
|
|
@@ -209,6 +209,7 @@ def timetic(func):
|
|
|
def loaddict():
|
|
|
loc = dict()
|
|
|
df = pd.read_excel("../data/location.xlsx", header=0)
|
|
|
+ #df = pd.read_excel("../datasource/loc_miss.xlsx", header=0)
|
|
|
loc['zh'] = dict(df[['name', 'norm_name']].values)
|
|
|
loc['pinyin'] = dict(df[['name_pinyin', 'norm_name']].values)
|
|
|
short_val = [(i, 80) for i in df['short_name'].dropna().tolist()]
|
|
@@ -262,7 +263,7 @@ def norm_community(asr):
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- asr="前进区水平社区宝升三号楼"
|
|
|
+ asr="宝升三号楼漏水了"
|
|
|
print(f"asr:{asr}")
|
|
|
loc = norm_community(asr)
|
|
|
print(f"命中小区:{loc}")
|