mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-14 16:55:42 +00:00
Update
This commit is contained in:
parent
e95cc42a22
commit
8b087e55b7
50
CorpusAnalysisClient.js.md
Normal file
50
CorpusAnalysisClient.js.md
Normal 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
|
||||
```
|
@ -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
|
||||
|
@ -8,6 +8,10 @@ DOCKER_CERT_PATH=
|
||||
DOCKER_HOST=
|
||||
DOCKER_TLS_VERIFY=
|
||||
|
||||
### GitLab Registry ###
|
||||
GITLAB_USERNAME=
|
||||
GITLAB_PASSWORD=
|
||||
|
||||
### Flask ###
|
||||
FLASK_CONFIG=
|
||||
# SECRET_KEY=
|
||||
|
Loading…
Reference in New Issue
Block a user