From 78eb6ad68967fe79468e4af345341599f0b52a78 Mon Sep 17 00:00:00 2001 From: Bruno Guillaume Date: Tue, 30 Jun 2020 20:47:12 +0200 Subject: [PATCH] new services --- Makefile | 4 ++++ content/grew_server.md | 51 +++++++++++++++++++++++++++++++++++++++--- content/trans_14.md | 4 ++-- 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b6c20a2..ef78b78 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,10 @@ grew_server: ${HUGO} scp -r public/grew_server/index.html grew.lchn.fr:/home/guillaum/www/doc/grew_server +trans_14: + ${HUGO} + scp -r public/trans_14/index.html grew.lchn.fr:/home/guillaum/www/doc/trans_14 + match_doc: ${HUGO} scp -r public/match_doc/index.html grew.lchn.fr:/home/guillaum/www/doc/match_doc diff --git a/content/grew_server.md b/content/grew_server.md index f57144e..6057673 100644 --- a/content/grew_server.md +++ b/content/grew_server.md @@ -8,10 +8,12 @@ title = "grew_server" +++ -# Use Grew as a server for the Arborator tool +# Grew-API for the Arborator-Grew tool + +The Arborator-Grew tool is available on [https://arboratorgrew.ilpga.fr/](https://arboratorgrew.ilpga.fr/). The `grew_server` tool is a web server which manages set of annotated graphs with multiple annotations on the same sentence. -It is built to be used with the Arborator graph annotation tool. +It is built to be used as an API by the Arborator-Grew graph annotation tool. Below, we suppose that the server is available on some `baseURL`. For testing purpose, a demo server should be available at `http://arborator.grew.fr`. @@ -208,7 +210,9 @@ Each occurrence is described by a dict --- -:warning::warning::warning: **dev** only +# New services in DEV + +:warning::warning::warning: The services are only available on the DEV server for testing ## Usage of Grew rules @@ -252,3 +256,44 @@ The output gives the number of rewritten graphs and the number of unchanged grap "unchanged": 0 } ``` + +## Services for project configuration + +### The `getProjectConfig` service + * `( project_id)` + + The service returns a JSON data of the current configuration of the project + +### The `updateProjectConfig` service + * `( project_id, config)` + + The service update the current configuration associated to the project. + + +## Export the most recent data in a project + +### The `exportProject` service + * `( project_id)` + +The service returns an URL on a file containing the "export" of the project. In the export: + + * only graphs in the project with a `timestamp` numerical metadata are present + * if several graphs share the same `sent_id`, keep only the graph with the highest `timestamp` + +Note that the output may be impacted by the problem reported in [#9](https://github.com/Arborator/arborator-flask/issues/9). + + + +## Get the lexicon computed from a treebank + +### The `getLexicon` service + * `( project_id)` + +The service returns a JSON data of the lexicon produced with the script [treebank2lexicon.py](https://github.com/Arborator/arborator-flask/blob/master/lexicon/treebank2lexicon.py). + + The set of graphs considered for the production of the lexicon is the one considered in the `exportProject` service: + * only graphs in the project with a `timestamp` numerical metadata are considered + * if several graphs share the same `sent_id`, only the graph with the highest `timestamp` is kept + +Note that the output may be impacted by the problem reported in [#9](https://github.com/Arborator/arborator-flask/issues/9). + diff --git a/content/trans_14.md b/content/trans_14.md index 7e72f32..179c282 100644 --- a/content/trans_14.md +++ b/content/trans_14.md @@ -20,7 +20,7 @@ With the pattern: pattern { e: M -> N; N [upos=ADJ]} ``` -if you want to cluster the result on the label of the edge `e`, the old syntax was `e`, the new one is `e.label` ([Try it!](http://match.grew.fr/?corpus=SUD_French-GSD@latest&clustering=e.label&pattern=pattern%20%7B%20N%20-%3E%20M;N%20[upos=ADJ]%20%7D)). +if you want to cluster the result on the label of the edge `e`, the old syntax was `e`, the new one is `e.label` ([Try it!](http://match.grew.fr/?corpus=SUD_French-GSD@latest&custom=5efb883ea71fc&clustering=e.label)). ## Access to the label of an edge in the pattern @@ -46,7 +46,7 @@ To avoid this, it is possible to give an ordering constraint on some internal id * old_syntax: `id(D1) < id (D2)` * new_syntax: `D1.__id__ < D2.__id__` -The complete pattern is: +The complete pattern in new syntax: ```grew pattern { -- GitLab