forked from kristjan/cjvt-valency
fixed reduce_0 functors sort ACT, PAT, other...
This commit is contained in:
parent
e597a72334
commit
c563df31ba
23
Makefile
23
Makefile
|
@ -3,32 +3,21 @@
|
|||
|
||||
MAKE_ROOT = $(shell pwd)
|
||||
|
||||
### Input data
|
||||
# I received ssj500k in one .xml file,
|
||||
# kres is composed of many .xml files
|
||||
# I generated srl tags for kres in separate .json files
|
||||
# (for each kres.xml file there is a kres.json file with srl tags)
|
||||
# SSJ_FILE = "$(MAKE_ROOT)/data/samples/ssj_xml/ssj500k-sl.body.sample.xml"
|
||||
SSJ_FILE = "$(MAKE_ROOT)/data/ssj_file_link"
|
||||
# KRES_FOLDER = "$(MAKE_ROOT)/data/samples/kres_xml"
|
||||
KRES_FOLDER = "$(MAKE_ROOT)/data/kres_xml_folder_link"
|
||||
# KRES_SRL_FOLDER = "$(MAKE_ROOT)/data/samples/kres_srl_json"
|
||||
KRES_SRL_FOLDER = "$(MAKE_ROOT)/data/kres_json_folder_link"
|
||||
|
||||
OUTPUT = "db"
|
||||
# OUTPUT = "file"
|
||||
OUTDIR = "/tmp/three" # if you're running this in docker, make sure to mount the volume
|
||||
DBADDR = "0.0.0.0:27017" # don't use localhost
|
||||
|
||||
# credentials from .gitignored file
|
||||
# create it from env.default
|
||||
include env.local
|
||||
|
||||
N_CORES = 5
|
||||
# insert kres files into database in chunks, for fewer connections
|
||||
KRES_CHUNK_SIZE = 30
|
||||
|
||||
# Backend parameters found in conf file (see make backend)
|
||||
# Some backend parameters can be found in conf file (see make backend)
|
||||
|
||||
# credentials from .gitignored file
|
||||
# create it from env.default
|
||||
include env.local
|
||||
|
||||
export
|
||||
|
||||
.PHONY: python-env fill-database
|
||||
|
|
15
README.md
15
README.md
|
@ -81,21 +81,18 @@ $ make backend-dev
|
|||
$ 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
|
||||
# development
|
||||
# ./config_dev.json
|
||||
$ make frontend-dev # development
|
||||
|
||||
# production
|
||||
# ./config_prod.json
|
||||
$ make frontend-prod
|
||||
```
|
||||
|
||||
|
|
21
env.default
21
env.default
|
@ -1,6 +1,27 @@
|
|||
### Credentials
|
||||
|
||||
MONGOEXPRESS_USER = mxuser
|
||||
MONGOEXPRESS_PASS = mxuserpassword
|
||||
DB_ADM_USER = valadmin
|
||||
DB_ADM_PASS = valadminpass
|
||||
DB_USR_USER = valuser
|
||||
DB_USR_PASS = valuserpass
|
||||
|
||||
|
||||
|
||||
### Input data
|
||||
|
||||
# I received ssj500k in one .xml file,
|
||||
# kres is composed of many .xml files
|
||||
# I generated srl tags for kres in separate .json files
|
||||
# (for each kres.xml file there is a kres.json file with srl tags)
|
||||
|
||||
# Use the files from /data/samples.tar.gz for a quick app build with a subset of data.
|
||||
|
||||
SSJ_FILE = "$(MAKE_ROOT)/data/samples/ssj_xml/ssj500k-sl.body.sample.xml"
|
||||
# SSJ_FILE = "$(MAKE_ROOT)/data/ssj_file_link"
|
||||
KRES_FOLDER = "$(MAKE_ROOT)/data/samples/kres_xml"
|
||||
# KRES_FOLDER = "$(MAKE_ROOT)/data/kres_xml_folder_link"
|
||||
KRES_SRL_FOLDER = "$(MAKE_ROOT)/data/samples/kres_srl_json"
|
||||
# KRES_SRL_FOLDER = "$(MAKE_ROOT)/data/kres_json_folder_link"
|
||||
|
||||
|
|
25
makefile_vars.example
Normal file
25
makefile_vars.example
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Environment specific Makefile parameters
|
||||
# Copy this file and name it makefile_args
|
||||
# makefile_args gets .gitignored
|
||||
|
||||
# SSJ_FILE = "$(MAKE_ROOT)/data/samples/ssj_xml/ssj500k-sl.body.sample.xml"
|
||||
SSJ_FILE = "$(MAKE_ROOT)/data/ssj_file_link"
|
||||
# KRES_FOLDER = "$(MAKE_ROOT)/data/samples/kres_xml"
|
||||
KRES_FOLDER = "$(MAKE_ROOT)/data/kres_xml_folder_link"
|
||||
# KRES_SRL_FOLDER = "$(MAKE_ROOT)/data/samples/kres_srl_json"
|
||||
KRES_SRL_FOLDER = "$(MAKE_ROOT)/data/kres_json_folder_link"
|
||||
|
||||
OUTPUT = "db"
|
||||
# OUTPUT = "file"
|
||||
OUTDIR = "/tmp/three" # if you're running this in docker, make sure to mount the volume
|
||||
DBADDR = "0.0.0.0:27017" # don't use localhost
|
||||
|
||||
# credentials from .gitignored file
|
||||
# create it from env.default
|
||||
include env.local
|
||||
|
||||
N_CORES = 5
|
||||
# insert kres files into database in chunks, for fewer connections
|
||||
KRES_CHUNK_SIZE = 30
|
||||
|
||||
# Backend parameters found in conf file (see make backend)
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"api_addr": "http://193.2.76.103"
|
||||
"api_addr": "http://0.0.0.0:8084"
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"api_addr": "http://193.2.76.103:8084"
|
||||
"api_addr": "http://0.0.0.0:8084"
|
||||
}
|
||||
|
|
28
src/frontend_vue/package-lock.json
generated
28
src/frontend_vue/package-lock.json
generated
|
@ -3632,14 +3632,12 @@
|
|||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -3654,20 +3652,17 @@
|
|||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
@ -3784,8 +3779,7 @@
|
|||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -3797,7 +3791,6 @@
|
|||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -3812,7 +3805,6 @@
|
|||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
|
@ -3820,14 +3812,12 @@
|
|||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -3846,7 +3836,6 @@
|
|||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
@ -3927,8 +3916,7 @@
|
|||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -3940,7 +3928,6 @@
|
|||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -4062,7 +4049,6 @@
|
|||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
|
|
@ -33,8 +33,10 @@ def reduce_0(frames, valdb_sensemap=None):
|
|||
separated_frames = []
|
||||
for frame in frames:
|
||||
for tid in frame.tids:
|
||||
tmp_frame = DC(frame)
|
||||
tmp_frame = frame
|
||||
tmp_frame.tids = [tid]
|
||||
tmp_frame.sort_slots()
|
||||
|
||||
separated_frames.append(tmp_frame)
|
||||
sorting_strings.append("".join(
|
||||
[slot.functor for slot in tmp_frame.slots]
|
||||
|
|
Loading…
Reference in New Issue
Block a user