我正在跟踪这个性洞察力入门,但总是在下面得到错误消息的API调用
{"help":"http:\/\/www.ibm.com\/smarterplanet\/us\/en\/ibmwatson\/developercloud\/doc\/personality-insights\/#overviewInput","code":400,"sub_code":"S00014","error":"The number of words 2 is less than the minimum number of words required for analysis: 100"}这是卷曲请求
curl -X POST --user xxxx:yyyy --header "Content-Type: text/plain;charset=utf-8" --data-binary "profile.txt" "https://gateway.watsonplatform.net/personality-insights/api/v3/profile?version=2017-11-14"我是不是漏掉了什么?
发布于 2017-11-14 06:31:38
个性洞察力至少需要100个字才能发挥作用。但你要等到1200字左右才能得到真正的洞察(IIRC)。
它告诉你你只提供了两个词。如果不是这种情况,请确保正确转义JSON数据。
发布于 2018-02-19 09:11:29
这个问题很老,但似乎没有人补充答案。万一有人也遇到了同样的错误,那么在指定必须从其中读取内容的文件时,这个问题将丢失"@“。从ubuntu 16.04上的“男人卷发”
If you start the data with the letter @, the rest should be a filename. Data is posted in a similar manner as --data-ascii
does, except that newlines and carriage returns are preserved and conversions are never done.所以,请求应该是curl -X POST --user xxxx:yyyy --header "Content-Type: text/plain;charset=utf-8" --data-binary "@profile.txt" "https://gateway.watsonplatform.net/personality-insights/api/v3/profile?version=2017-11-14"
https://stackoverflow.com/questions/47278210
复制相似问题