Tag: personality insights

Python和Node.js不同的WPI v3结果

我正在使用Watson Personality Insights来获取文本的结果。 我从Node.js个性洞察演示获得的结果与使用Python SDK时得到的结果不同。 Python脚本: with open('input_file.txt', encoding='utf-8') as input_file: profile = personality_insights.profile( input_file.read(), content_type='text/plain;charset=utf-8', raw_scores=True, consumption_preferences=True) print(profile) Python输出:(仅添加适宜性分数以保持字符限制) { "trait_id": "big5_agreeableness", "name": "Agreeableness", "category": "personality", "percentile": 0.2641097108346445, "raw_score": 0.717124182764663, "children": [{ "trait_id": "facet_altruism", "name": "Altruism", "category": "personality", "percentile": 0.5930367181429955, "raw_score": 0.7133462509414262 }, { "trait_id": "facet_cooperation", "name": "Cooperation", "category": "personality", "percentile": 0.49207238025136585, "raw_score": 0.5781918028043768 […]