我有一个Maven项目,其中包含下面列出的依赖项:

wink.version = 1.1.3-incubating和spring.version = 3.0.5.RELEASE
Spring中的应用上下文包括:
<bean class="org.apache.wink.spring.Registrar">
<property name="classes">
<set value-type="java.lang.Class">
</set>
</property>
<property name="instances">
<set>
<ref local="restexample" />
</set>
</property>
</bean>
<bean id="restexample" class="com.example.rest.ExampleRest"></bean>
Run Code Online (Sandbox Code Playgroud)
web.xml包括:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:META-INF/wink/wink-core-context.xml
classpath:applicationContext.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>restServlet</servlet-name>
<servlet-class>org.apache.wink.server.internal.servlet.RestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>restServlet</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud)
Rest Java Class包括:
@Path("/ex")
public class ExampleRest {
@GET
@Produces(MediaType.APPLICATION_JSON)
public String example() throws IOException {
return "{ 'id':'test' }";
}
}
Run Code Online (Sandbox Code Playgroud)
查看日志我没有看到任何异常或问题,正在创建'restexample'bean但是...... 当我尝试调用REST服务时,我得到了404.
我认为Apache Wink没有注册ExampleRest.
任何的想法 ?
更新02/14:在日志中,我注意到Apache …
我想使用Bluemix Conversation 示例应用程序
并向其添加语音输入和输出.Bluemix TTS和STT还有其他示例应用程序可用.有哪些选项可以集成这三个功能,哪些是推荐给初学者的?
text-to-speech speech-to-text ibm-watson watson-conversation ibm-cloud
我只熟悉Watson助手,因为我已经完成了一些工作,但我从未使用Watson Assistant Solutions.
它是Watson助手之上的新API还是应用程序?我什么时候应该使用其中一种?
saas watson-conversation ibm-cloud watson-assistant watson-assistant-solutions
我曾尝试将 ibm 音调分析器 api 用于我的项目,但如果我包含依赖项,则会出现此错误:
在模块 annotations-3.0.1.jar (com.google.code.findbugs:annotations:3.0.1) 和 jsr305-3.0.2.jar (com.google.code.findbugs:jsr305) 中发现重复类 javax.annotation.CheckForNull :3.0.2) 在模块 annotations-3.0.1.jar (com.google.code.findbugs:annotations:3.0.1) 和 jsr305-3.0.2.jar (com.google.代码.findbugs:jsr305:3.0.2)
我已经尝试删除测试依赖项,但仍然无效,请帮忙
应用程序文件:
apply plugin: 'com.android.application'
android {
configurations.all{
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
compileSdkVersion 28
defaultConfig {
applicationId "com.example.loginapp"
minSdkVersion 22
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
compile 'com.ibm.watson:tone-analyzer:7.0.0'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: …Run Code Online (Sandbox Code Playgroud) 我无法在我的简单管道中运行uima ruta脚本.我正在使用下一个库:
而我正在使用org.apache.uima.fit.pipeline.SimplePipeline:
SimplePipeline.runPipeline(
UriCollectionReader.getCollectionReaderFromDirectory(filesDirectory), //directory with text files
UriToDocumentTextAnnotator.getDescription(),
StanfordCoreNLPAnnotator.getDescription(),//stanford tokenize, ssplit, pos, lemma, ner, parse, dcoref
AnalysisEngineFactory.createEngineDescription(RUTA_ANALYSIS_ENGINE),//RUTA script
AnalysisEngineFactory.createEngineDescription(//
XWriter.class,
XWriter.PARAM_OUTPUT_DIRECTORY_NAME, outputDirectory,
XWriter.PARAM_FILE_NAMER_CLASS_NAME, ViewURIFileNamer.class.getName())
);
Run Code Online (Sandbox Code Playgroud)
我要做的是使用StandfordNLP注释器(来自ClearTK)并应用ruta脚本.目前,一切都运行没有错误,默认的ruta注释被添加到CAS,但我的规则创建的注释没有添加到CAS.
我的脚本是:
PACKAGE edu.isistan.carcha.concern;
TYPESYSTEM org.cleartk.ClearTKTypeSystem;
DECLARE persistence
Token{FEATURE("lemma","storage") -> MARK(persistence)};
Run Code Online (Sandbox Code Playgroud)
查看带注释的文件:

那里有基本的ruta注释,如"SPACE"或"SW",所以RutaEngine正在创建并添加到管道......
如何正确创建AnalysisEngineDescriptor以运行Ruta脚本?
注意: RUTA_ANALYSIS_ENGINE它是我从RUTA工作台复制的引擎描述符.
我在管道中使用了一些UIMA注释器.它运行如下任务:
问题是我不想将所有注释(Token,Sentence,SubToken,Time,myAnnotations等)写入磁盘,因为文件变得非常大.
我想删除所有注释,只保留由My Annotator创建的注释.
我正在使用下一个库:
而我正在使用org.apache.uima.fit.pipeline.SimplePipeline:
SimplePipeline.runPipeline(
UriCollectionReader.getCollectionReaderFromDirectory(filesDirectory), //directory with text files
UriToDocumentTextAnnotator.getDescription(),
StanfordCoreNLPAnnotator.getDescription(),//stanford tokenize, ssplit, pos, lemma, ner, parse, dcoref
AnalysisEngineFactory.createEngineDescription(//
XWriter.class,
XWriter.PARAM_OUTPUT_DIRECTORY_NAME, outputDirectory,
XWriter.PARAM_FILE_NAMER_CLASS_NAME, ViewURIFileNamer.class.getName())
);
Run Code Online (Sandbox Code Playgroud)
我想要做的是使用Standford NLP注释器(来自ClearTK)并删除无用的注释.
我该怎么做呢?
据我所知,您可以使用removeFromIndexes();Annotation实例中的方法.
我是否需要创建UIMA处理器并将其添加到我的管道中?
我正在尝试以形式发送formData,使用请求获取的图片流
问题在于请求在请求之后被触发formData。有什么方法可以传送图像请求以识别?但是可以自由地向formData?添加参数?
例如:
var req = request({
method: 'POST',
url: 'http://www.foo.bar/api/v1/tag/recognize',
formData: {
image_file: request('http://visual-recognition-demo.mybluemix.net/images/horses.jpg'),
param2: 'value2'
},
json: true,
});
Run Code Online (Sandbox Code Playgroud)
我该如何射击:
request('http://visual-recognition-demo.mybluemix.net/images/horses.jpg')
因此响应可以用于 req
更新:http://visual-recognition-demo.mybluemix.net/images/horses.jpg响应中似乎Content-Length缺少标题
,您只会得到
Transfer-Encoding: chunked
在这里更多细节
我正在尝试使用 API 测试器在 Bluemix 中测试 IBM Watson Visual Recognition Service。
1st 我想获得有效标签的列表:
在阅读演示应用程序的源代码时,我正在推断标签,例如“动物”
知道我做错了什么吗?
演示应用程序似乎运行良好,至少它可以将奥巴马的形象识别为“人,总统,奥巴马”:)
在许多情况下,将已知信息(例如,用户姓名以呈现个性化问候语)传递到新的Watson Dialog对话中可能会有所帮助,以避免向用户询问多余或不必要的问题.在查看API文档时,我没有看到这样做的方法.是否有将变量传递给Watson Dialog对话的最佳实践方法?
我一直在尝试将IBM Watson文档转换服务与演示PDF一起使用,但它并没有将文档转换成一点点.所有它正在做的,是创建一个答案单元,这真的很长:
"text": "Watson is an artificially intelligent computer system capable of answering questions posed in natural language,[2] developed in IBM's DeepQA project by a research team led by principal investigator David Ferrucci. Watson was named after IBM's first CEO and industrialist Thomas J. Watson.[3][4] The computer system was specifically developed to answer questions on the quiz show Jeopardy![5] In 2011, Watson competed on Jeopardy! against former winners Brad Rutter and Ken Jennings.[3][6] Watson received the first place prize of …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一个纯函数来使用 Alchemy API 和 watson-developer-cloud npm 包,但我无法弄清楚如何同步执行它的调用。是否有替代方法或包可以同步接收其结果?在 I/O 发生时阻塞绝对没问题。
我刚去Bluemix看到有一个名为Discovery的新实验服务.显然,它可以在其他文件类型中提取PDF,Word文档和HTML页面.
该服务与文档转换(DC)之间有什么区别?之前,我曾经使用DC转换我的文档,然后在Retrieve和Rank中将它们编入索引?Discovery是检索和排名与文档转换的合并吗?
ibm-watson ×5
java ×4
ibm-cloud ×3
maven ×2
node.js ×2
uima ×2
alchemyapi ×1
android ×1
apache-wink ×1
gradle ×1
nlp ×1
node-request ×1
ruta ×1
saas ×1
solr ×1
spring ×1