Tag: ibm watson cognitive

沃森发现服务 – 查询数据收集Node.js – 通道缺失

我对Watson发现服务的响应运行一个查询,我想在我的回应中包括这些段落(默认情况下,段落不包括,使用段落=真应该包括它,但我不明白。 var queryString = {'natural_language_query':searchString}; insert(cloudantDb,"9", "Call freie Textsuche ", queryString, "-", params); return new Promise ((resolve, reject) => { discovery.query({ environment_id: 'my env id', collection_id: 'my coll id', query: queryString, passages: true, count: 3 } 有人可以帮忙吗?

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 […]

IBM Watson语音分析器发布请求问题

我是学生,学习编码和社区帮助表示赞赏。 我已经托pipe我的代码与域名https://depionicapp.herokuapp.com/ heroku。 当我正在做邮递员的请求时,我得到错误500但与云9我能够得到的结果。 var http = require('http'); var bodyParser = require("body-parser") var vision = require('@google-cloud/vision'); // Authorizing on a per-API-basis. You don't need to do this if you auth on a // global basis (see Authorization section above). var express = require('express'); var router = express(); var visionClient = vision({ projectId: 'ionic-face-api', keyFilename: './ionic.json' […]

在从DevOps Services部署Meteor应用程序时,如何在IBM Bluemix上安装必需的软件包?

我希望有一个IBM Bluemix向导可以回答这个问题。 我有一个用Meteor编写的应用程序,我正在尝试部署到Bluemix。 该应用程序包含这一行: var AdmZip = Npm.require('adm-zip'); 这当然意味着应用程序使用adm-zip包来做东西。 当我尝试通过DevOps Services部署应用程序时,会失败并显示以下错误: ERR Error: Cannot find module 'adm-zip' 在日志中。 如果我删除Npm.require行,应用程序部署很好,但当然不能正常工作,因为adm-zip不在那里。 我的package.json文件中包含以下内容: "dependencies": { "adm-zip": "*" }, 我相信应该足以加载adm-zip包。 我也试着指定adm-zip的Git URL,但结果是一样的。 有谁知道我必须做什么才能让这个应用程序正确部署?

如何添加外部npm包到phonegap?

如何将外部npm包添加到phonegap? 在我的phonegap应用程序中,我需要添加IBM Watson Speech To Text node.js包,您可以在这里find它 – http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/speech-to-text / API / V1 /?节点# 我知道我必须通过npm install watson-developer-cloud来下载它,但是之后我应该怎样做才能在phonegap中访问?

Slack-App-Watson:Watson从之前收到的消息中泄露意图

我正在写一个简单的Slack机器人,它可以查找给定位置的天气状况。 在沃森对话框中,沃森做得很好: 我:天气请 沃森(检测到#weather_asked):你想知道天气状况? 我:巴黎 Watson(检测到@location for intent #weather_asked):查找巴黎的天气状况… 但在我的node.js应用程序(连接到Slack),似乎沃森是“ 不记住,我提供了#weather_asked意图的位置 ”: 我:天气请 Watson(检测到#weather_asked):哪里? 我:巴黎 沃森(只检测@位置和意图#location_given):我很抱歉,我不明白。 (fallback anything_else) 这就像Watson,当通过我的NodeJS应用程序使用时,忘记了最初的意图#weather_asked,并重置为其主要的对话框。 我错过了什么? 我的Watson对话对话框configuration的屏幕截图: http : //imgur.com/a/vKo8P 编辑:我发现我的应用程序发送用户的input到Watson与一个新的对话ID。 如果它已经存在,我会尝试设置这个上下文。

为什么当我在节点js中创build一个post调用时,Watson-conversation对任何请求都返回相同的默认响应

我已经在对话服务中创build了一个示例训练数据,现在我正在尝试使用节点js创build一个聊天应用程序的后期调用。我创build了一个后期调用,它正在工作,但并不如预期的那样。给我任何呼叫的默认响应。 我开始知道我们需要将响应中获得的上下文值传递给下一个调用进行stream,但不知道该怎么做。 有人可以帮助我。 以下是我的代码 var express = require('express'); var conversationV1 = require('watson-developer-cloud/conversation/v1'); var bodyParser = require('body-parser'); var app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); var conversation = new conversationV1({ username: 'xxxxxx-1a06-4a90-xxxxx-xxxxxxxxxxx', password: 'xxxxxxxxxx', version_date: conversationV1.VERSION_DATE_2016_09_20 }); const updateMessage = (input, response) => { var responseText = null; if (!response.output) { response.output = {}; } […]

使用Watson API Nodejs分析json

我想分析一个我用Watson的音调分析器dynamic创build的JSON文件。 我希望它读取文件,然后分析它。 我如何使tone_analyzer.tone方法读取文件? 谢谢。 app.get('/results', function(req, res) { // This is the json file I want to analyze fs.readFile('./output.json', null, cb); function cb() { tone_analyzer.tone({ // How can I pass the file here? text: '' }, function(err, tone) { if (err) console.log(err); else console.log(JSON.stringify(tone, null, 2)); }); console.log('Finished reading file.') } res.render('results'); })

如何在沃森对话中使用select选项

我正在尝试将select标记插入到对话中,以使用户更加简单。 我做到了这一点: 而在index.js中: function selected(){ switch($('#selected option:selected').val()){ case 01: alert("01"); break; case 02: alert("02"); break; } }; 但它不能识别所选的选项。 我尝试没有select的function()(只与开关的情况下),但它没有奏效..有人可以帮我吗? 非常感谢!

与谷歌环聊和ibm watson集成

有没有什么办法可以将Google Hangouts与IBM watson集成到一起?我已经通过节点j创build了一个bot,并且希望将该bot与Google环聊进行接口,其中会话将从ibm watson