Google Cloud Natural Language API - How is document magnitude calculated?

牧云@^-^@ 提交于 2019-12-11 18:22:48

问题


I am currently working with the Google Cloud Natural Language API and need to know how the magnitude value for a whole document (consisting of several sentences) is calculated?

For the document sentiment score the average of the scores for each sentence is taken. For the document magnitude I would have assumed that it's calculated by taking the absolute sum of the individual magnitude values for each sentence. But after testing some paragraphs it's clear that it's not the correct way to calculate it. Would anyone be able to explain this to me?

Any help is much appreciated!


回答1:


It is calculated as as the sum of the magnitudes from all sentences. Would you provide an example in your tests where this isn't correct?



来源:https://stackoverflow.com/questions/51398253/google-cloud-natural-language-api-how-is-document-magnitude-calculated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!