Bluemix - 分类器演示问题中的自然语言分类器凭据

时间:2016-03-16 03:05:55

标签: ibm-cloud ibm-watson nl-classifier

我尝试使用IBM Watson Natural语言分类器,但我无法继续并加载我的答案。出于某种原因,用户名和密码并非始终有效。

这个执行得很好:

 curl -u username:password -F training_data=@questions.csv -F
 training_metadata="{\"language\":\"en\",\"name\":\"my_classifier\"}"
 "https://url/v1/classifiers"

但是当我尝试执行以下命令时,它不起作用:

 curl -u username:password -X POST -H "Content-Type: application/json"
 -d @questions-with-classifier-ega-war/target/classes/answers.json http://yourAppName.mybluemix.net/api/v1/manage/answer

它只是一次又一次地询问用户和密码。它与第一个curl命令中的密码相同。

提前致谢!

1 个答案:

答案 0 :(得分:0)

我认为您将服务凭据(您在第一个命令中使用的凭据)与用于管理数据库的凭据混淆,其中一个示例应用程序“有关分类器的问题”(请参阅​​pom.xml)。 / p>

要运行第二个命令,请确保使用根目录中import React, { StyleSheet, Dimensions, } from 'react-native'; var width = Dimensions.get('window').width; //full screen width var styles = StyleSheet.create({ container: { ... }, listView: { flexWrap: 'wrap',//here you are telling the list view to wrap its items next to each others flexDirection: 'row', }, rowContainer: { width:width/2, //here you make row item half width according to screen width } }); 的凭据