Programmatically Import/Export Documents

110 views
Skip to first unread message

dill...@cs.washington.edu

unread,
Jul 12, 2016, 5:01:32 PM7/12/16
to webanno-user
Hello,

Is there any way to programmatically import and export documents from a project on a server running WebAnno?

Regards,

Dillon Laird

Richard Eckart de Castilho

unread,
Jul 12, 2016, 5:12:27 PM7/12/16
to dill...@cs.washington.edu, webanno-user
What exactly is the scenario in which you require such a functionality? What actions to you expect to be performed in which way by whom?

Best,

-- Richard

dill...@cs.washington.edu

unread,
Jul 12, 2016, 6:46:39 PM7/12/16
to webanno-user, dill...@cs.washington.edu
We have a feed of articles we want to tag that's updated regularly. Instead of manually downloading these articles and re-uploading them to the server we'd like to run a program to do this automatically. So it would need to login to the server, navigate to the project and upload the documents to that project.

Regards,

Dillon Laird

Richard Eckart de Castilho

unread,
Jul 12, 2016, 6:53:36 PM7/12/16
to dill...@cs.washington.edu, webanno-user
We have an experimental API that allows remotely creating complete projects.
We do not have an API to remotely export existing projects.
We also do not (yet) have an API to add/remove/export documents to/from existing projects.

However, your request to remotely interact with WebAnno is not the only one that has recently come up. I am planning on looking into extending the remote API some time before end of July.

It would be helpful if you could open an issue specifying what remote calls you expect and which parameters you expect to be passing to them.

Cheers,

-- Richard

dill...@cs.washington.edu

unread,
Jul 13, 2016, 2:01:20 PM7/13/16
to webanno-user, dill...@cs.washington.edu
Will do, thank you!

Regards,

Dillon Laird

Niko Partanen

unread,
Oct 11, 2016, 10:10:46 AM10/11/16
to webanno-user, dill...@cs.washington.edu
Hello! Has there been any new developments with this? I would like to export data from WebAnno directly as well. Of course I can always make a new export manually, but it would be simpler to just read the text and annotations without manual intervention as I'm in a point where I need to modify the annotations constantly as I try to figure out the most useful annotation model for my current study.

Best wishes,

Niko Partanen

Richard Eckart de Castilho

unread,
Oct 11, 2016, 10:20:08 AM10/11/16
to Niko Partanen, webanno-user, dill...@cs.washington.edu
Hi Niko,

> On 11.10.2016, at 16:10, Niko Partanen <nikotapi...@gmail.com> wrote:
>
> Hello! Has there been any new developments with this? I would like to export data from WebAnno directly as well. Of course I can always make a new export manually, but it would be simpler to just read the text and annotations without manual intervention as I'm in a point where I need to modify the annotations constantly as I try to figure out the most useful annotation model for my current study.

Work is ongoing, but it has a huge *experimental* tag :)

So in order to try this out, you need to start WebAnno with
"-Dwebanno.remote-api.enable=true". When you have done that,
then you can go to the user management, and add the role
"ROLE_REMOTE" to a user.

That user will then be able to use the experimental remote API.
The API does not have documentation yet and may be subject
to change. You can find some usage examples in the source code:

https://github.com/webanno/webanno/blob/master/webanno-webapp/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/remoteapi/RemoteApiController.java

Mind that the examples expect WebAnno to be running in Eclipse,
so the URL/port may be slightly different on your system.

If you find any issues or have feature requests, please
open an issue in the issue tracker:

https://github.com/webanno/webanno/issues

The remote API has a dedicated label in the tracker (which
we have to assign to the issues, you cannot do that yourself).
So if you want to see all the open/closed issues for the remote
API only, check out

https://github.com/webanno/webanno/issues?q=label%3A%22Remote+API%22

Cheers,

-- Richard

Niko Partanen

unread,
Oct 11, 2016, 10:33:26 AM10/11/16
to webanno-user, nikotapi...@gmail.com, dill...@cs.washington.edu
Thank you! I will take a look!
Reply all
Reply to author
Forward
0 new messages