-2
我使用:拆开Python的URL请求
import requests
data = 'text=great'
print(requests.post('http://text-processing.com/api/sentiment/', data=data).text)
返回:
{"probability": {"neg": 0.30135019761690551, "neutral": 0.27119050546800266, "pos": 0.69864980238309449}, "label": "pos"}
,我想浏览,使用结构不仅是文本字符串。我怎样才能把它变成一本字典?
'json.loads()'? – Delgan
http://stackoverflow.com/questions/4917006/string-to-dictionary-in-python – Firedrake969