1

我正在发送一个 JSON 文件,其中包含来自不同用户的多个评论和评论,但似乎响应是一般性的,而不是针对我通过 JSON 中的“内容”字段发送的每条评论。API 是否能够为每个用户的每条评论返回见解?还是将其视为单个用户的多个评论?例如,我有不同用户的评论:

{
       "contentItems": [
         {
           "content": "amazon's business model is incredible, is riding a number of secular trends (ecommerce, cloud, ai), and the stock is a winner. employees are making more money than expected.+ leadership principles drive a high performance culture that focuses on customers. it feels great to work on products that customers love.+ you get to work on very difficult problems with smart people. once you establish yourself as a high performer, you have a high level of job security and internal mobility. teams are constantly hiring and building really innovative things and you are encouraged to move around and explore.+ teams tend to be lean and you will be asked to learn a lot quickly. ownership is highly valued.+ office environment is really desirable. located in a great downtown seattle neighborhood, many people walk to work, bring dogs to the office, and restaurants and bars are very accessible.+ amazon veterans tend to be incredibly talented individuals, and other companies realize it. being successful at amazon is well respected in the industry.. - work/life balance can be a challenge. work demands are high and teams are often too lean. you have to set your own boundaries. even with kind managers, overachievers will feel under water.- frugality as a core value goes overboard. if amazon doesn't have to give it you, it won't. no perks, no free food or drinks, bad coffee, unsubsidized cafeterias, mediocre hardware for non-technical people. there doesn't seem to be a morale budget and you will have few official team outings.- compensation policies are not employee friendly: 401k matching is subpar. once your signing cash bonus is fully vested, your entire compensation will be base salary and stock. base salary is capped at ~$160k across the company. stock vests twice a year if you're below a director, so your compensation is very lumpy. stock price appreciation is taken into consideration in your total compensation targets (ie if the value of previously offered shares increases, the company will count that as a raise and might not grant you additional stock bonuses, despite strong performance).",
           "contenttype": "text/plain",
           "id": "19"
         },
         {
           "content": "--> culture & leadership principles - the amazon leadership principles are not a mission statement that was developed and then forgotten. we live and die by these principles and they drive our culture... and the culture is pretty great!--> work with super smart, very talented people",
           "contenttype": "text/plain",
           "id": "250"
         },
         {
           "content": "1) when christmas season is busy time, management seems nice to everyone and act like they love and respect that you came to work each day, you can do no wrong as long as your busy. after a year i now know that working for wal*mart just sucks monkey balls!!!!!",
           "contenttype": "text/plain",
           "id": "66674"
         }
       ]
     }

我期望每条评论的输出都包含个性洞察。相反,我对所有评论都有一个一般性的回应。所以,我想知道该服务是否能够做到这一点,或者我是否必须为每个用户发送一个 JSON?该问题与This other question 有关,但我需要处理来自不同用户的 1000 条或更多评论,而不是单个用户的 1000 条推文。

4

1 回答 1

1

您需要每人发送一个请求,但即使可以向不同用户发送一个请求,为每个用户获取一个配置文件,在您的示例中,两个内容也会作为错误返回。那是因为 PI 至少需要 100 个字才能给出结果,而最后两条推文的字数少于 100 个,因此您将无法获得个人资料。

该表可以为您提供有关获取个人资料所需的字数以及使用少量字数的缺点的更多信息。

如果在您的用例中通常无法获得至少 100 个单词,则使用 PI 可能不可行,但您至少可以使用 Tone Analyzer获得有关用户语气的一些信息,这不一样东西,但可以提供有关每个用户的一些信息。

于 2018-06-27T12:50:57.953 回答