bring up your old project... you need the api structure!

This commit is contained in:
voje 2019-04-05 00:46:19 +02:00
parent 044fa66910
commit 5a064b4e07
3 changed files with 4 additions and 4 deletions

View File

@ -15,9 +15,9 @@ $ git submodule update
Set db admin, user, pass, etc in 'Makefile'. Set db admin, user, pass, etc in 'Makefile'.
Spin up the database service and create users: Spin up the database service and create users:
```bash ```bash
# $ make database-clean # opt # $ make database-clean # opt, removes docker services, not data
$ make database-service $ make database-service
$ make database-users $ make database-users # only first time; user data persists too
``` ```
Populate the database with data form files: Populate the database with data form files:

View File

@ -11,7 +11,7 @@ services:
MONGO_INITDB_ROOT_USERNAME: ${DB_ADM_USER} MONGO_INITDB_ROOT_USERNAME: ${DB_ADM_USER}
MONGO_INITDB_ROOT_PASSWORD: ${DB_ADM_PASS} MONGO_INITDB_ROOT_PASSWORD: ${DB_ADM_PASS}
volumes: volumes:
- ${HOME}/mongo_container/data/:/data/ - ${HOME}/mongo_container/data/:/data/db
mongo-express: mongo-express:
image: mongo-express image: mongo-express

View File

@ -28,7 +28,7 @@ def frames_from_db_entry(dbent):
tids=[_full_tid(srl["to"])] tids=[_full_tid(srl["to"])]
) for srl in srlarr ) for srl in srlarr
], ],
sentences=[dbent["tokens"]], sentences=[(dbent["sid"], dbent["tokens"])], # [(ssj_id, {word: _, lemma: _, msd: _}), ...]
)] )]
return frames return frames