简体   繁体   English

使用GET参数为Web界面提供要注释的特定文本

[英]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.

相关问题 对于Tokensregex,规则是否需要为令牌类型才能使用注释? - For Tokensregex, does a rule need to be token type to use Annotate? 使用 pycorenlp.StanfordCoreNLP.annotate 时,为什么我会得到 String 应该在哪里得到 dict? - Why am I getting String where should get a dict when using pycorenlp.StanfordCoreNLP.annotate? 针对特定单词读取文本文件 - reading text file against specific words 使StanfordCoreNLP适应处理嘈杂的Web文本吗? - Adapting StanfordCoreNLP to process noisy web text? 如何使用NLP(自定义标签)添加提取特定文本? - How to add extract specific text using NLP (customized tags) ? 如何以相反的方式获取Tree的文本 - How to get the text for Tree in reverse way 我如何使用斯坦福NER(命名实体识别器)的python接口? - How do I use python interface of Stanford NER(named entity recogniser)? TokensRegex-使用注释内捕获的组作为Annotate函数的参数 - TokensRegex - using a group captured inside an annotation as an argument to the Annotate function 懒惰解析斯坦福CoreNLP只能获得特定句子的情感 - Lazy parsing with Stanford CoreNLP to get sentiment only of specific sentences TokensRegex规则可以在文档级别进行注释吗? - Can TokensRegex rule annotate on the document level?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM