Merge branch 'master' of gitea.cjvt.si:kristjan/cjvt-valency

This commit is contained in:
voje 2019-04-06 17:47:20 +02:00
commit 87b1d010e2
5 changed files with 12 additions and 5 deletions

View File

@ -10,7 +10,9 @@ MAKE_ROOT = $(shell pwd)
# (for each kres.xml file there is a kres.json file with srl tags)
SSJ_FILE = "$(MAKE_ROOT)/data/samples/ssj_example/ssj500k-sl.body.sample.xml"
KRES_FOLDER = "$(MAKE_ROOT)/data/samples/kres_example"
KRES_SRL_FOLDER = "$(MAKE_ROOT)/data/kres_srl"
# KRES_SRL_FOLDER = "/home/kristjan/kres_srl/final_json/" # t420
KRES_SRL_FOLDER = "/home/voje/work_data/final_json" # work-pc
OUTPUT = "db"
OUTDIR = "/home/voje/workdir/test_out"
DBADDR = "0.0.0.0:27017" # don't use localhost

View File

@ -14,7 +14,9 @@ $ git submodule update
### 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`.
```bash
$ 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

View File

@ -116,7 +116,7 @@
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=",
"dev": true,
"requires": {
"sprintf-js": "~1.0.2"

View File

@ -51,7 +51,7 @@
v-on:mouseleave="setHid()"
v-on:click="setSid(idx=null, tid=token[0])"
v-bind:title="token[1].msd"
><span v-if="$root.mkspace(index, token[1].word)">&nbsp;</span>{{ token[1].word }}</span>
><span v-if="$root.mkspace(index, token[1].text )">&nbsp;</span>{{ token[1].text }}</span>
</blockquote>
</div>
</div>
@ -67,7 +67,7 @@
v-on:mouseleave="setHid()"
v-on:click="setSid(idx=null, tid=token[0])"
v-bind:title="token[1].msd"
><span v-if="$root.mkspace(index, token[1].word)">&nbsp;</span>{{ token[1].word }}</span>
><span v-if="$root.mkspace(index, token[1].text )">&nbsp;</span>{{ token[1].text }}</span>
</blockquote>
</div>
</div>

View File

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