-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QuestionTranslater gets stuck #35
Comments
Doesn't appear to get stuck in the actual translation of the question: txltr = QuestionTranslator.QuestionTranslator()
txltr.find_question_parameters("What is the clinical outcome pathway of dicumarol for treatment of coagulation")
Out[591]:
{'corpus_index': 2,
'error_code': 'missing_term',
'error_message': 'Sorry, I was unable to find the appropriate terms to answer your question. Missing term(s):\nA disease (eg. diphtheritic cystitis, pancreatic endocrine carcinoma, malaria, clear cell sarcoma, etc.)',
'input_text': 'What is the clinical outcome pathway of dicumarol for treatment of coagulation',
'terms': {'disease_name': None, 'drug_name': 'dicumarol'}} It's just that coagulation isn't a disease, and COP's need a drug and a disease |
@edeutsch Any updates for this issue? |
you're right, this is definitely a response parsing issue, not a stuck issue. I haven't tried to work on the solution yet. been working on the response API. But I will try to fix it tonight. |
@dkoslicki , so while trying to sleuth this out, I just tried this: in the file QuestionTranslator.py, in main(): but when I run with: I am uncertain if this is the problem, but it seems like a problem? |
…doesn't know what the term is. Reference #35
@edeutsch Yeah, I was incorrectly assuming a drug and a disease were given. Fix pushed to NewStdAPI branch. |
This is still causing problems. So now the result is: The way my code currently works is: if there is a specified knownQueryTypeId, then the result get forwarded to than query type handler. So I suggest that if the QuestionTranslator doesn't feel that there is enough information to forward to a QX handler, then knownQueryTypeId should be None/null. Does that seem like a good rule? Or what should be the signal that the translated question should be forwarded to a QX handler? Maybe we need to come up with a flow diagram for the QuestionTranslator |
Yeah, a flow diagram would be helpful. Maybe as a condition to be passed to QX handler would be:
|
okay, i suppose it makes sense to me to set the query type ID to None if there isn't enough information to send it to the reasoner, and only an error message should be displayed. But it's not black and white. I wonder if there will ever be a case where a query type is ready to be sent to a reasoner with one of the terms set to None. Maybe some queries will have optional terms? I don't know, but seems possible maybe? What is the clinical outcome pathway of physostigmine for treatment of glaucoma, excluding fructose metabolism? |
Hmmm... good point! Maybe we just add a new key to the dict called something like OkToSend? Ugly, but at least obvious what it does. |
while compiling the spreadsheet I did notice that if there is a message, then it is not ready to send. So I could change the logic to say: if there is a message, then halt and print the message rather than proceed. Does that seem like a good rule for now? |
@edeutsch Yeah, that seems like a good way to go! |
The new QuestionTranslator gets wedged on this question:
What is the clinical outcome pathway of dicumarol for treatment of coagulation?
The text was updated successfully, but these errors were encountered: