-4
我想创建一个python脚本,它将接收一个字符串并确定从数据库表中返回哪些行。例如,如果字符串是“海豚是非常聪明的动物”。 python脚本应搜索Dolphins和smart这两个词,然后返回“海豚是一种非常聪明的动物”,而“海豚是最聪明的动物之一”。下面显示了表格的示例渲染。任何想法从哪里开始。我目前正在从R转换到Python。使用字符串返回来自数据库的结果
Table A
Animals Characteristics Statement
Dolphins Smart Dolphins are an extremely smart animal
Dolphins Smart Dolphins are one of the most intelligent animals
Bears Smart Bears are extremely smart animals
http://stackoverflow.com/help/on-topic – obayhan