从 Java 程序内部运行 GATE 管道,无需 GUI。使用gate构建一个tomcat应用程序

发布于 2024-08-19 09:54:40 字数 199 浏览 4 评论 0原文

我已经为 GATE 构建了一些插件组件,并与 ANNIE 工具相结合,在 GATE 平台上运行管道。

有谁知道如何从控制台运行管道?我想在 Tomcat 中构建一个 Web 应用程序,它将从网页中获取纯文本,将其传递到我构建的 GATE 管道并执行某些操作。所以我需要在一个简单的Java文件中运行GATE,怎么做呢?

预先感谢并为我糟糕的语法感到抱歉

i have built some plugin components to GATE and in combination with ANNIE tools, im running a pipeline in GATE platform.

Does anyone know how can i run a pipeline from the console? I want to build a web application in Tomcat that will be taking a plain text from the web page, passing it to the GATE pipeline i have built and do something. So i need to run GATE in a simple Java file, how can it be done?

Thanks in advance and sorry for my poor grammar

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

浅唱ヾ落雨殇 2024-08-26 09:54:40

首先下载GATE,大概320mb什么的。然后,如果您使用 netbeans,您可以通过转到项目 -> 来将 GATE 添加到您的项目中。图书馆->右键单击“添加 jar 文件”并浏览到 GATE 安装文件,然后选择 lib 文件夹中的所有 JAR 文件。一旦所有 jar 文件都存在,您就可以使用 GATE。 (参见 GATE 第 7 章 GATE 嵌入式)。

一个简单的例子是使用 ANNIE,有standAloneAnnie,你只需要传递一个文件,它就会为你处理它。

http://gate.ac.uk/ wiki/code-repository/src/sheffield/examples/StandAloneAnnie.java

将 ANNIE 添加到项目后,您可以通过调用它的 main 方法来使用它/您可以稍后更改它的名称,并传递一个 File 数组作为参数。文件数组应包含您要处理的文件。

First download GATE, it's like 320mb or something. Then if you use netbeans, you can add GATE to your by going to project -> Library -> right click add jar files and browse to GATE installation file and choose all JAR files inside lib folder. Once all jar file are there you can use GATE. (See GATE chapter.7 GATE Embedded).

A simple example is to use ANNIE, there is standAloneAnnie where you only need to pass a file and it will process it for you.

http://gate.ac.uk/wiki/code-repository/src/sheffield/examples/StandAloneAnnie.java

Once you add ANNIE to your project, you can use it by calling it's main method/you can change it's name later, and pass a File array as a parameter. The file array should contain the file you want to process.

飘逸的'云 2024-08-26 09:54:40

GATE 示例代码 向您展示了如何以多种不同的方式运行 GATE,特别是金鱼示例< /a> 说明如何从命令行运行 GATE。

The GATE example code shows you how to run GATE in a number of different ways, in particular the Goldfish example illustrates how to run GATE from the command line.

人间☆小暴躁 2024-08-26 09:54:40

您需要使用 GATE EMBEDDED。

看这里:http://gate.ac.uk/family/embedded.html
这里:http://gate.ac.uk/sale/tao/splitch7 .html#x11-1540007
注意多线程问题(查看多线程部分):gate.ac.uk/sale/tao/splitch7.html#x11-1730007.13

You need to use GATE EMBEDDED.

Look at here: http://gate.ac.uk/family/embedded.html
here: http://gate.ac.uk/sale/tao/splitch7.html#x11-1540007
take care with multi-thread issues (look multi-thread part): gate.ac.uk/sale/tao/splitch7.html#x11-1730007.13

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文