I have created a Dockerfile for alpino that let's you run it as a server, which can output XML+dependencies automatically (see github.com/vanatteveldt/alpino-server).
This PR checks for an ALPINO_SERVER env var if ALPINO_HOME is not found, and then parses via a GET request to the server.
Hey @rubenIzquierdo (cc @antske )
I have created a Dockerfile for alpino that let's you run it as a server, which can output XML+dependencies automatically (see github.com/vanatteveldt/alpino-server).
This PR checks for an ALPINO_SERVER env var if ALPINO_HOME is not found, and then parses via a GET request to the server.
I've refactored the code a bit so all the Alpino calls are in a separate function (call_alpino; https://github.com/vanatteveldt/morphosyntactic_parser_nl/commit/d2bda281be14e5e7c80dd07bd5cadbede351efbb). The next commit branches call_alpino into a local and server version (https://github.com/vanatteveldt/morphosyntactic_parser_nl/commit/8c1466e53fe32798aee5b7e98a730f3551c27b84)
I've also modified a couple of small things to make it python3 compatible (https://github.com/vanatteveldt/morphosyntactic_parser_nl/commit/067efdacb1d66f7e849f0426eef85337c7e348e9). I only checked with a simple example so it's quite possible that something is still not compatible.
(I will now actively test this so I might stlil run into issues)
Let me know what you think!
-- Wouter
Edit: the automatic test is broken because it downloads a nonexisting alpino, I might fix that if I have time :)