Reduce 0 and 1 working, todo reduce 5.

This commit is contained in:
voje 2019-04-05 16:45:40 +02:00
parent 6415da588d
commit 50af2e0215
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) # (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" SSJ_FILE = "$(MAKE_ROOT)/data/samples/ssj_example/ssj500k-sl.body.sample.xml"
KRES_FOLDER = "$(MAKE_ROOT)/data/samples/kres_example" 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" OUTPUT = "db"
OUTDIR = "/home/voje/workdir/test_out" OUTDIR = "/home/voje/workdir/test_out"
DBADDR = "0.0.0.0:27017" # don't use localhost DBADDR = "0.0.0.0:27017" # don't use localhost

View File

@ -14,7 +14,9 @@ $ git submodule update
### Database (2 containers) ### Database (2 containers)
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:
Make sure you create a folder for the data on host machine (see `mongodb-stack.yml` `volumes`.
```bash ```bash
$ mkdir -p ${HOME}/mongo_container/data/ # default one
# $ make database-clean # opt, removes docker services, not data # $ make database-clean # opt, removes docker services, not data
$ make database-service $ make database-service
$ make database-users # only first time; user data persists too $ make database-users # only first time; user data persists too

View File

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

View File

@ -51,7 +51,7 @@
v-on:mouseleave="setHid()" v-on:mouseleave="setHid()"
v-on:click="setSid(idx=null, tid=token[0])" v-on:click="setSid(idx=null, tid=token[0])"
v-bind:title="token[1].msd" 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> </blockquote>
</div> </div>
</div> </div>
@ -67,7 +67,7 @@
v-on:mouseleave="setHid()" v-on:mouseleave="setHid()"
v-on:click="setSid(idx=null, tid=token[0])" v-on:click="setSid(idx=null, tid=token[0])"
v-bind:title="token[1].msd" 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> </blockquote>
</div> </div>
</div> </div>

View File

@ -28,7 +28,10 @@ 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["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 return frames