新浪中文分词服务怎么用
endpoint = "http://segment.sae.sina.com.cn/urlclient.php?encoding=UTF-8"
data = {
"context": "柯林斯英汉双解大词典",
"word_tag": 1
}
r = requests.post(endpoint, data=data)
r.encoding='utf-8'
return r.text
全文:https://www.douban.com/group/topic/37489839/
我还发现一个同样是用Get方式就可以分词的在线服务 http://www.pullword.com/ 网页拉下去会发现
api.pullword.com //使用get方式获取分词
百度api市集也有提供该api 但是需要key
http://apistore.baidu.com/apiworks/servicedetail/143.html
Discuz! 在线中文分词、关键词提取服务
不同于使用自己的服务器进行分词,Discuz!在线中文分词服务是基于API返回分词结果的。在项目中,我们只需要一个函数即可方便地进行分词、关键词提取。
以下是根据Discuz!在线分词服务API写的函数,测试可正常运行:全文:http://www.thinkphp.cn/code/563.html

浙公网安备 33010602011771号