Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
Q
QASystemOnMedicalKG
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lishen
QASystemOnMedicalKG
Commits
8d09a61d
Commit
8d09a61d
authored
Apr 18, 2023
by
lishen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix]
parent
632ff31c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
answer_search.py
answer_search.py
+10
-0
No files found.
answer_search.py
View file @
8d09a61d
...
...
@@ -66,6 +66,16 @@ class AnswerSearcher:
subject
=
answers
[
0
][
'm.name'
]
final_answer
=
'{0}可能的成因有:{1}'
.
format
(
subject
,
';'
.
join
(
list
(
set
(
desc
))[:
self
.
num_limit
]))
elif
question_type
==
question_type_enum
.
DISEASE_NOT_FOOD
:
desc
=
[
i
[
'n.name'
]
for
i
in
answers
]
subject
=
answers
[
0
][
'm.name'
]
final_answer
=
'{0}忌食:{1}'
.
format
(
subject
,
';'
.
join
(
list
(
set
(
desc
))[:
self
.
num_limit
]))
elif
question_type
==
question_type_enum
.
DISEASE_DO_FOOD
:
desc
=
[
i
[
'n.name'
]
for
i
in
answers
]
subject
=
answers
[
0
][
'm.name'
]
final_answer
=
'{0}推荐食用:{1}'
.
format
(
subject
,
';'
.
join
(
list
(
set
(
desc
))[:
self
.
num_limit
]))
elif
question_type
==
question_type_enum
.
DISEASE_PREVENT
:
desc
=
[
self
.
sm4
.
decryptSM4
(
i
[
'm.prevent'
])
for
i
in
answers
]
subject
=
answers
[
0
][
'm.name'
]
...
...
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