Debian Codegraph @

bindings/java/README

raw
1
2 Java Bindings for Link Grammar
3 ------------------------------
4
5 These files implement Java language bindings for Link Grammar. They do
6 not extend the parsing algorithms already present in Link-Grammar in
7 any way. The allow users to call the standard link-grammar API from
8 Java.
9
10 These bindings do provide an additional feature, though: they can be used
11 in a client-server mode, so that, instead of calling the link-grammar
12 library directly, the parse request can be sent to a link-grammar
13 server, which then returns the result in JSON format, which the bindings
14 here are able to parse, and present the same API, as if the library
15 was called locally.
16
17 The shell script link-grammar-server.sh demonstrates how to run the
18 parser server. Once the server is started, parses can be obtained
19 by using ordinary TCPIP sockets; so, for example:
20
21 echo "text:this is a test" | nc localhost 9000
22
23 will return a JSON-encoded parse of the sentence "this is a test".
24 The diagram string can be obtained with:
25
26 echo "storeDiagramString:true, text:this is a test" | nc localhost 9000
27
28 The port number 9000 is configurable; the language, dictionary path
29 and number of threads to use can also be specified. See the shell
30 script for details.