Contains the tool for viewing valency frames and adding user-defined senses to underlying sentences.
Go to file
2019-04-14 00:26:15 +02:00
data some frontend cleanup, backend bug fix (database volumd mount) 2019-03-24 13:45:19 +01:00
dip_src modifying frames api 2019-03-28 19:17:45 +01:00
dockerfiles fixed db init input duplicatoin 2019-04-11 07:18:51 +02:00
old_api_examples some more old_api output 2019-04-06 17:39:55 +02:00
src fixed functor-frames 2019-04-14 00:26:15 +02:00
.gitignore frames and slots from db 2019-04-02 21:51:44 +02:00
.gitmodules make fill_database 2019-03-17 17:25:59 +01:00
Makefile fixed functor-frames 2019-04-14 00:26:15 +02:00
README.md fixed functor-frames 2019-04-14 00:26:15 +02:00

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
# beforehand, set the data files in Makefile
$ 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:
# run the first time, to prepare the db, then kill
# it runs a few minutes, there should be a new collection in the db when finished
$ make backend-dev-init  

$ 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.