spechub / Hets

The Heterogeneous Tool Set
http://hets.eu
GNU General Public License v2.0
57 stars 19 forks source link

RESTful Interface - download translation output (feature request) #1903

Open carmenchui opened 5 years ago

carmenchui commented 5 years ago

Hi HETS team,

I am a postdoc under the supervision of Michael Gruninger at the University of Toronto. I was wondering if it was possible to include a feature in the RESTful interface to be able to download the theory translations from the interface itself (instead of copying and pasting the translation output manually).

We are examining OWL files from FIBO that contain many axioms and individuals, and would like to translate them from OWL to Common Logic using HETS. Due to the size of these OWL files, it is a bit tedious to scroll to the bottom of the translation output window.

Using Ctrl/Cmd+A to select everything doesn't exactly work as part of the top text of the interface gets included in the selection (screenshot attached).

image

A download button or a way to save the output in the interface would be immensely helpful.

Thanks, Carmen

tillmo commented 5 years ago

Hi Carmen,

I see that a button would be helpful. However note that if you have larger and/or many ontologies to translate, it might be easier to use the RESTful interface, namely the command GET /theory/.... Here is a small shell script that you can use:

url=$(echo $1 | sed 's@:@%3a@g;s@/@%2f@g')
curl rest.hets.eu/theory/$url?node=0\&translation=OWL22CommonLogic\&format=dol

Save it to a file, say owl2cl, make it executable, and then call ./owl2cl <url>

Best, Till

tillmo commented 5 years ago

I should add that the RESTful interface requires that the ontology is stored at some URL. However, if you install Hets via a docker container, and replace rest.hets.eu with localhost:8000, you can use local files as well (with URL file:///path/to/file).

carmenchui commented 5 years ago

Hi Till,

Thank you for your quick reply.

I'll give the shell script a try and store the ontologies on my own webhost. Is there a limit to the file size with using the RESTful interface? A file I was working with earlier was around 13mb and I realized it might be too big to be processed by the rest.hets.eu web interface.

Out of curiosity, is there an option in HETS to translate into LADR (Prover9/Otter/Mace4 syntax)? We have our own set of tools to translate from Common Logic to LADR, and are primarily using HETS to go from OWL to CL.

Our hardware in the lab is fairly old, so newer versions of Docker can't be installed -- I did ask our computing department to check if it was possible, but the outcome was that we'd need new hardware. Michael and I are looking into this, but do you have any suggestions for the minimal hardware requirements for self-hosting HETS and its RESTful interface? Ideally, we'd like to future-proof any new hardware we get and use it for at least another five years.

Cheers, Carmen