[英]Use GET params to provide the Web interface with a specific text to annotate
I would like to link to my instance of CoreNLP server, with a specified text (and possibly, a specified set of annotators). 我想链接到我的CoreNLP服务器实例,并带有指定的文本(可能还有指定的一组注释器)。 (ie without having to paste the text then click on Submit)
(即无需粘贴文本,然后单击提交)
Is there a way to do this? 有没有办法做到这一点?
(I know and use the API version, but I'm looking for the Web visualisation) (我知道并使用API版本,但我正在寻找Web可视化效果)
No, the current visualization doesn't let you specify text in the URL (though pull requests are always welcome; the source code lives here ). 不可以,当前的可视化效果不允许您在URL中指定文本(尽管始终欢迎拉取请求;源代码位于此处 )。
The server does respond to regular POST requests, eg, if you want to call CoreNLP from your own webpage though Javascript. 服务器确实响应常规的POST请求,例如,如果您想通过Javascript从自己的网页调用CoreNLP。 For example, the given curl command (from the documentation page :
例如,给定的curl命令(来自文档页面 :
curl --data 'The quick brown fox jumped over the lazy dog.' 'http://localhost:9000/?properties={%22annotators%22%3A%22tokenize%2Cssplit%2Cpos%22%2C%22outputFormat%22%3A%22json%22}' -o -
The visualization is done with more or less vanilla brat . 可视化是用或多或少的香草蛋完成的 。
So, answering my own question: this is now possible (I believe from CoreNlp 3.8), after a successfully merged pull request from yours truly. 因此,回答我自己的问题:在您真正成功合并合并请求请求之后,现在有可能(我相信来自CoreNlp 3.8)。
This is the relevant pull request: https://github.com/stanfordnlp/CoreNLP/pull/423 这是相关的请求请求: https : //github.com/stanfordnlp/CoreNLP/pull/423
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.