How to create delphin-viz style demo grammars

I’d like to produce demo-style versions of my inferred grammars, similar to the mini Jacy, Zhong, Indra, etc. grammars here http://delph-in.github.io/delphin-viz/demo/. My hope is to give the linguists who supplied me with datasets a version of the inferred grammars that they can play around with without having to install logon, learn to use the lkb, etc.

I found the repo here: https://github.com/delph-in/delphin-viz
but I’m not really sure how to get started. Do we have instructions/documentation of the process anywhere?

1 Like

Hi, there are two parts to any web demo: (1) the client (front end) is what the user sees and it takes the user-supplied parameters (sentence, number/type of results, etc.) and sends it to (2) the server (back end) which receives the request, acts on it (e.g., parses with ACE or the LKB), and sends the response back to the client, which then displays the results. delphin-viz is only the client, and it communicates with some existing server (either LKB-based or ACE-based, as they accept the same kinds of requests and return the same responses).

So first you’ll need to setup a DELPH-IN Web API server with compiled images of the grammars (see here). You can then fork delphin-viz on GitHub (if you want GitHub to serve the client web page) or clone the repository to your own web server. Then you’ll need to modify the fork or clone’s demo/resources.js so it includes the appropriate grammars pointing to the new server.

There are some older solutions, such as demophin (client and server) and bottlenose (server), but these are deprecated and won’t work with the latest PyDelphin, so I don’t recommend them. Also note that PyDelphin includes a client to communicate with a running instance of the server, but that is a Python client, not a web (HTML, etc.) client, so it won’t help with a web demo. You can also try using the LOGON demo code, but I can’t help with setting it up.

1 Like

Thanks, Mike!