What libraries for modeling complex questionaire in Python?

烈酒焚心 提交于 2020-01-13 03:42:26

问题


For a medical website I'm trying to model a questionnaire that should result in a range of possible diagnoses. The questionnaire is fairly complex with a lot of conditionals. I made a flowchart/decision tree to reflect this questionnaire. I'm using Django to make the website.

Currently I'm thinking of using Python Graph to turn the flow chart into a weighted graph. Each question would be a node and each answer would be an edge+label. I could then walk through the complete graph and the endpoint of the walk would be the fitting diagnose.

Is python graph the best library to model this questionnaire or woul you do it differently (other library or other way of modeling the graph)?


回答1:


You are modelling a deterministic finite-state automaton. Have a look at python-automata.



来源:https://stackoverflow.com/questions/3362034/what-libraries-for-modeling-complex-questionaire-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!