rug-compling / alpino-api Goto Github PK
View Code? Open in Web Editor NEWAPI voor een Alpino-server
API voor een Alpino-server
Every call I make appears to give me an attempt of what seems to be a parse of header messages.
I only get back XML that seems incorrect in my opinion.
To get it to work I changed the port number and tried some combination of headers.
Any quick pointers what I am doing wrong? I will try to debug
Note I am using the alpino-docker with following additions
apt-get update && apt-get update # && apt-get -y upgrade
apt-get -y install git
# dpkg-query --search "\/nc" | less # try to locate what to install if a command is missing, aaaaarh
apt-get -y install netcat
apt-get -y install psmisc
apt-get -y install net-tools
apt-get -y install whois
apt-get -y install telnet
## !!! remove "-u $USER" arguments of "pgrep" command in script "start.bash" (because no $USER set in environment) !!!
# ignore "tail: unrecognized file system type 0x794c7630", see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810669
issuing this innocent statement:
curl -v -H "Accept:text/plain" -H "Content-Type:text/plain; charset=UTF-8" --data-binary '
{
"request": "info"
}
' http://127.0.0.1:11212/json
gets me this:
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 11221 (#0)
> POST /json HTTP/1.1
> User-Agent: curl/7.38.0
> Host: 127.0.0.1:11221
> Accept:application/json
> Content-Type:application/json
> Content-Length: 27
>
* upload completely sent off: 27 out of 27 bytes
<?xml version="1.0" encoding="UTF-8"?>
<alpino_ds version="1.6">
<parser cats="1" skips="0" />
<node begin="0" cat="top" end="3" his="name" his_1="begin" id="0" rel="top">
" rel="--">="POST /json HTTP/1.1d="3" his="name" his_1="begin" id="1" mwu_root="POST /json HTTP/1.1
<node begin="0" end="1" frame="proper_name(both)" id="2" lcat="np" lemma="POST" neclass="MISC" num="both" pos="name" postag="SPEC(deeleigen)" pt="spec" rel="mwp" rnum="sg" root="POST" sense="POST" spect
ype="deeleigen" word="POST"/>
<node begin="1" end="2" frame="proper_name(both)" id="3" lcat="np" lemma="/json" neclass="MISC" num="both" pos="name" postag="SPEC(deeleigen)" pt="spec" rel="mwp" rnum="sg" root="/json" sense="/json" sp
ectype="deeleigen" word="/json"/>
"/>pectype="deeleigen" word="HTTP/1.1" postag="SPEC(deeleigen)" pt="spec" rel="mwp" rnum="sg" root="HTTP/1.1
</node>
</node>
</sentence> sentid="127.0.0.1">POST /json HTTP/1.1
</alpino_ds>
* Connection #0 to host 127.0.0.1 left intact
Thanks in advance,
Regards,
Bart,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.