Skip to content
Snippets Groups Projects
Commit c9da3dce authored by Jakob Moser's avatar Jakob Moser
Browse files

Add documentation for the new feature

parent 46c1e71e
No related branches found
No related tags found
No related merge requests found
......@@ -20,15 +20,13 @@ This will create an image from the [`Dockerfile`](Dockerfile) and tag it as `xle
To parse a sentence using xle-docker, you need two things:
* The path to an LFG grammar file, e.g. `/home/mustermann/grammatik.lfg`
* A grammar, e.g. stored in the file `/home/mustermann/grammatik.lfg`
* A sentence, e.g. `in der Arena veranstalten die Ritter ein Turnier .`
Then, you have to execute the following command:
You can then execute the following command:
```bash
sudo docker run -it \
--mount type=bind,source=/home/mustermann/grammatik.lfg,target=/grammar.lfg \
xle "in der Arena veranstalten die Ritter ein Turnier ."
sudo docker run -i xle "in der Arena veranstalten die Ritter ein Turnier ." < /home/mustermann/grammatik.lfg
```
This will take a few seconds. The parses will then be output to the command line using XLE's own XML export format. If you want to store the output in a file, append `> name_of_your_file.xml` at the end of the command.
......@@ -39,6 +37,18 @@ This will take a few seconds. The parses will then be output to the command line
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`).
</details>
<details>
<summary>Alternative using mounts</summary>
The container also allows the Grammar file to be mounted as `/grammar.lfg`, if this is more useful for your specific use case:
```bash
sudo docker run \
--mount type=bind,source=/home/mustermann/grammatik.lfg,target=/grammar.lfg \
xle "in der Arena veranstalten die Ritter ein Turnier ."
```
</details>
## :page_with_curl: About
Here, a more detailed explanation of the relevant files is given. The used sources are marked with :books:.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment