Commit 126cd999 authored by Quentin David's avatar Quentin David
Browse files

Add docs

parent d76113ff
......@@ -8,6 +8,7 @@ It will applies onto it POS Tagging, Neologisms detection with Neoveille & motif
## I: User set their corpus.
POST /corpora
Request Body:
``` javascript
{
......@@ -50,6 +51,7 @@ From now on, this document (as in a mongo document) will bear the id "corpusId".
## II: User set their pipeline
POST /pipelines
Request body:
``` javascript
{
......@@ -92,6 +94,7 @@ This pipeline, created as a document will now bear the id "pipelineId".
Now that the system registered both the corpus and the pipeline. It can create the corpus process linking those two and start it.
POST /corpusProcesses
Request body:
``` javascript
{
......@@ -129,16 +132,19 @@ wordSegmentation is supposed to be already done as we posted the corpus.
So the system will need to apply the POS Tagger to the corpus.
**TO BE FILLED**
```
I guess it needs to call /modules/treeTagger,
fetch /corpora/corpusId or /corpusProcess/corpusProcessId and get its conllu which would be the concatenated version.
Then apply the process, then returning a conllu column that we can add to corpusProcess.conllu.
```
### First module execution
Once it is added to the collection, it will fetch the first process in the list of the corresponding pipelineId and call the module, then update:
POST /modules/Neoveille
Request body:
``` javascript
{
......@@ -154,11 +160,143 @@ Request body:
### At the same time: update of corpusProcess
PUT /corpusProcess/corpusProcessId
> PUT /corpusProcess/corpusProcessId
Request body:
``` javascript
{
currentProcessingModule: 'Neoveille',
status: 'Started'
}
```
\ No newline at end of file
```
## IV: Module Processing
The module will need to fetch the conllu.
(need a specific GET for conllu?)
> GET /corpusProcess/corpusProcessId
Then, given parameters given from the previous paragraph, applies the process to the conllu.
Neoveille will then give back two things:
- one output: the raw list of found neologisms
- one conllu column with
> POST /corpusProcess/corpusProcessId
Request body:
``` javascript
{
newConlluColumn:{
processId: 'neoveilleProcess',
columnTitle: 'NEOLOGISMS',
columnData: '_\n_\nY\n_' //Mockup
},
newOutput:{
processId: 'neoveilleProcess',
moduleName: 'Neoveille',
content: {
title: 'Liste des néologismes',
description: 'Effectué par Néoveille 2.0, créé par ...., avec ces paramètres:....',
data: 'schtroumpf\ncoronavirusé\nmacronisme' // ????
}
}
}
```
This request adds those two outputs of neoveille process to the collection corpusProcessId.
### When Neoveille is finised...
We can start the next module on the pipeline list.
> POST /modules/SDMC
Request body:
``` javascript
{
// TO BE FILLED
moduleParameters: [
{
name:,
value:
}
]
}
```
Then update our corpusProcess
> PUT /corpusProcess/corpusProcessId
Request body:
``` javascript
{
currentProcessingModule: 'SDMC'
}
```
Now, similar to Neoveille, SDMC will need to fetch the conllu,
> GET /corpusProcess/corpusProcessId
Process that corpus, then adds its output to the structure
> POST /corpusProcess/corpusProcessId
Request body:
``` javascript
{
newConlluColumn: {
processId: 'SDMCProcess',
columnTitle: 'MOTIFS',
columnData: '_\n_\n1:3\n_' //Mockup
}
}
```
## V - Processing annotations
Now that our pipeline is finished, we can update our status
> PUT /corpusProcesses/corpusProcessId
Request body:
``` javascript
{
currentProcessingModule: null,
status: 'Processing annotations'
}
```
From now, we can start analysing the conllu and populate AnnotatedDocuments.
First, the system extrates the conllu.
> GET /corpusProcesses/corpusProcessId/conllu
Then it processes it and adds to annotated documents the annotations:
> PUT /corpusProcesses/corpusProcessId (/annotation?)
Request body:
``` javascript
{
annotatedDocuments:[
{
documentId: 'article1DocumentId',
annotations: [
{
documentId: 'article1DocumentId',
processId: 'NeoveilleProcess',
conlluColumnId: 'conlluNeoveilleId',
moduleName: 'Neoveille',
content: {
title: 'Annotation des Néologismes',
description: 'Trouvés par Néoveille selon ces paramètres:',
data: null // ??
}
}
]
}
]
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment