This commit is contained in:
Patrick Jentsch 2020-02-03 13:38:08 +01:00
parent e95cc42a22
commit 8b087e55b7
3 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,50 @@
# Corpus Analysis
## Start einer Session
```javascript
nopaque.socket.emit("corpus_analysis_init", <corpusId>);
<corpusId> ~ number
// Show init loading modal
nopaque.socket.on("corpus_analysis_init", <response>);
<response> ~ {"code": <code>, "msg": <message>}
<code> ~ number // HTTP status code
<msg> ~ string
// Hide init loading modal
```
## Ausführen einer Suchanfrage
Ergebnisse werden Stückchenweise als "chunks" übertragen.
```javascript
nopaque.socket.emit("corpus_analysis_query", <query>);
<query> ~ string
// Clear result data store and list
result = {"query": <query>};
// Hide query result card
// Show query loading card
nopaque.socket.on("corpus_analysis_query", <response>);
<response>: {"code": <code>, "result": <result>}
<code> ~ number // Error, Success
<result> ~ {"matches": [<cpos>, ...],
"num_matches": <num_matches>,
"cpos_lookup": {<cpos>: <token>, ...},
"text_lookup": {<textId>: <text>, ...}}
<cpos> ~ number
<num_matches> ~ number
<token> ~ {"word": <word>, "lemma": <lemma>, "simple_pos": <simple_pos>, "pos": <pos>, "ner": <ner>, "text": <textId>, "s": <sId>}
<word> ~ string
<lemma> ~ string
<simple_pos> ~ string
<pos> ~ string
<ner> ~ string
<textId> ~ number
<sId> ~ number
<text> ~ {"author": <author>, "title": <text>, ...}
<s> ~ string
// Process response
// Hide query result card
// Show query loading card
```

View File

@ -20,8 +20,6 @@ services:
depends_on:
- db
- redis
deploy:
replicas: 25
environment:
- VIRTUAL_HOST=nopaque.localhost,129.70.216.233
env_file: nopaque.env

View File

@ -8,6 +8,10 @@ DOCKER_CERT_PATH=
DOCKER_HOST=
DOCKER_TLS_VERIFY=
### GitLab Registry ###
GITLAB_USERNAME=
GITLAB_PASSWORD=
### Flask ###
FLASK_CONFIG=
# SECRET_KEY=