forked from kristjan/cjvt-valency
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
voje
d135cc7f2b
|
5 years ago | |
---|---|---|
data | 5 years ago | |
dip_src | 5 years ago | |
dockerfiles | 5 years ago | |
old_api_examples | 5 years ago | |
src | 5 years ago | |
.gitignore | 5 years ago | |
.gitmodules | 5 years ago | |
Makefile | 5 years ago | |
README.md | 5 years ago |
README.md
cjvt-valency
Required submodules:
https://gitea.cjvt.si/kristjan/cjvt-corpusparser.git
$ git submodule init
$ git submodule update
Components
Database (2 containers)
Set db admin, user, pass, etc in 'Makefile'.
Spin up the database service and create users:
Make sure you create a folder for the data on host machine (see mongodb-stack.yml
volumes
.
$ mkdir -p ${HOME}/mongo_container/data/ # default one
# $ make database-clean # opt, removes docker services, not data
$ make database-service
$ make database-users # only first time; user data persists too
Populate the database with data form files:
- ssj500k.xml
- kres.xml
- kres_SRL.json
Set path to files in Makefile
.
# spin up a container with python env
$ make python-env
# install our packages
$ make python-env-install
# run the code
$ make fill-database
If all goes well, we should be able to inspect the database, filled with corpora, on 0.0.0.0:8087
.
Flask backend (1 container)
Relies heavily on the database. Set that up first.
$ make python-env
# development:
$ make backend-dev-init # run the first time, to prepare the db, then kill
$ make backend-dev # debug with this one
# production
$ make backend-prod
API endpoints:
- GET word list (pre-cached)
- GET reduced frames (pre-cached)
- POST senses
- User auth logic
Vue frontend (1 container)
Relies on Flask backend.
Before running make
, you might need to set the correct api address.
Check ./src/frontend_vue/config/config_prod.json
.
bash
# $ make frontend-dev # development
$ make frontend-prod
App available on: http://0.0.0.0:8080
.