如何在网上实施斯坦福大学的NLP

时间:2015-10-02 00:23:50

标签: javascript java ajax stanford-nlp

我使用斯坦福的NLP API和模型制作了一个项目。我想在网上实现这个Java项目。我看到Stanford-NLP自己提出了demo。那他们怎么做呢?他们如何在浏览器中调用他们的java方法和java API?他们使用AJAX和back0end Java服务器吗?我想做这样的事情。

对于如何解决问题的任何帮助和指导表示赞赏。

谢谢!

1 个答案:

答案 0 :(得分:1)

在下一个CoreNLP版本中 - 已经在Github上(编辑:这是在版本3.6.0中的CoreNLP中) - 我们有一个StanfordCoreNLPServer类:

https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/pipeline/StanfordCoreNLPServer.java

如果您运行此命令,现在可以使用注释器和文本列表向服务器发出请求以注释并接收JSON格式的响应。您可以在corenlp-brat.*文件中看到一个示例:

https://github.com/stanfordnlp/CoreNLP/tree/master/src/edu/stanford/nlp/pipeline/demo

特别是:

https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/pipeline/demo/corenlp-brat.js#L445