python version from https://github.com/ysc/QuestionAnsweringSystem