autocomplete-redis 是基于redis的自动补全,他会自动索引你要自动补全的句子,然后根据你的输入返回包含这个输入的句子。这儿有一个完整的演示实例:http://ohbooklist.com/redis/ ,我们索引了3.7万本书的名字。
安装方法:
安装pip(如果没有安装过的话): easy_install pip
安装pymmseg中文分词: pip install -e git://github.com/pluskid/pymmseg-cpp.git 依赖pymmseg中文分词,安装之。
安装autocomplete-redis: pip install -e git://github.com/fengli/autocomplete-redis.git
主页:https://github.com/fengli/autocomplete-redis
来自:开源中国社区