@@ -6,4 +6,39 @@ Docker image containing the [Xerox Linguistic Environment (XLE)][xle] to parse s
Designed to be used in a "functional" style: You start a container from this image, pass a grammar and a sentence as input parameter and get the C- and F-structure in return. The container then terminates.
## :whale: Build the image
To run a container from this image, you first have to build it. To do so, clone the repository, change into it and then execute
```bash
sudo docker build -t xle .
```
This will create an image from the [`Dockerfile`](Dockerfile) and tag it as `xle`.
## :runner: Run a container
To parse a sentence using xle-docker, you need three things:
* The path to an LFG grammar file, e.g. `/home/mustermann/grammatik.lfg`
* The path to an existing folder where the results should be stored, e.g. `/home/mustermann/parses`
* A sentence, e.g. `in der Arena veranstalten die Ritter ein Turnier .`
xle "in der Arena veranstalten die Ritter ein Turnier ."
```
This will take a few seconds, in which the container starts, xle parses the sentences and the results are written to a file. Afterwards, the container terminates.
<summary>
<details>Advanced tips</details>
Note that the `xle` specified in the `docker run` command is the name of the tag you've given the image when building, _not_ the command to be executed (although under the hood the container will call a Linux command also called `xle`).