|
@@ -153,13 +153,13 @@ CREATE TABLE botrecords (
|
|
|
answers = res.get("answer")
|
|
|
intent = ''
|
|
|
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:
|
|
|
+ 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"]:
|
|
|
+ if answer.get("code") in ["1.20", "1.10", "1.00", "1.30"]:
|
|
|
asr = answer.get("option", [{}])[-1].get("asr", '')
|
|
|
code = answer.get("code")
|
|
|
opt = answer.get("option", {})
|
|
|
- if (code == "1.10" and asr!="1") or (code == "1.00" and asr not in ["2", "1"]):
|
|
|
+ if (code in ["1.10", "1.30"] and asr!="1") or (code == "1.00" and asr not in ["2", "1"]):
|
|
|
if opt:
|
|
|
if opt[-1].get("subclass"):
|
|
|
intent = opt[-1].get("subclass")
|
|
@@ -250,4 +250,4 @@ def norm_community(asr):
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- print(norm_community("嗯,那个我们家是碧水兰庭的"))
|
|
|
+ print(norm_community("五一村"))
|