Skip to content
Snippets Groups Projects
Commit 54e1d9d6 authored by dcz's avatar dcz
Browse files

Refacoring

PHRASE_TYPES_EXPAND_FILE_NAME env
parent 9998df45
Branches
Tags
No related merge requests found
...@@ -14,6 +14,8 @@ EMAIL_USE_TLS=false ...@@ -14,6 +14,8 @@ EMAIL_USE_TLS=false
EMAIL_USE_SSL=false EMAIL_USE_SSL=false
SECRET_KEY=Ixosoh1iemoh0Heloh1thee5akooboonu5veehae4aikoh2ohg SECRET_KEY=Ixosoh1iemoh0Heloh1thee5akooboonu5veehae4aikoh2ohg
UWSGI_PROCESS_PER_CONTAINER=4 UWSGI_PROCESS_PER_CONTAINER=4
SERVER_HOST_NAME=valunifier.ipipan.waw.pl #SERVER_HOST_NAME=valunifier.ipipan.waw.pl
#SERVER_HOST_NAME=localhost SERVER_HOST_NAME=localhost
UNIFIED_FRAME_SERVICE_URL=http://walentygroupies.ipipan.waw.pl/ajax/clusterer/?unifier_frame_id= #UNIFIED_FRAME_SERVICE_URL=http://walentygroupies.ipipan.waw.pl/ajax/clusterer/?unifier_frame_id=
PHRASE_TYPES_EXPAND_FILE_NAME=phrase_types_expand_20210913.xml
WALENTY_FILE_NAME=walenty_20210913_smaller.xml
...@@ -25,7 +25,7 @@ To load different dictionary file one have to run following tasks before executi ...@@ -25,7 +25,7 @@ To load different dictionary file one have to run following tasks before executi
* download full Walenty dataset (TEI format can by downlowaded from http://zil.ipipan.waw.pl/Walenty) * download full Walenty dataset (TEI format can by downlowaded from http://zil.ipipan.waw.pl/Walenty)
* unpack zip archive and place xml file in ./data/walenty * unpack zip archive and place xml file in ./data/walenty
* set environment variable WALENTY_FILE_NAME to the name of file (e.g. export WALENTY_FILE_NAME=walenty_20210913.xml) * set environment variables WALENTY_FILE_NAME and PHRASE_TYPES_EXPAND_FILE_NAME to the name of files that will be loaded (e.g. export WALENTY_FILE_NAME=walenty_20210913.xml, export PHRASE_TYPES_EXPAND_FILE_NAME=phrase_types_expand_20210913.xml)
In order to reinstall a database instance a folder specified by the DATABASE_DIR should be removed. In order to reinstall a database instance a folder specified by the DATABASE_DIR should be removed.
......
...@@ -28,7 +28,8 @@ OPINION_MAP = { ...@@ -28,7 +28,8 @@ OPINION_MAP = {
} }
def import_expansions(): def import_expansions():
xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'phrase_types_expand_20230626.xml')#phrase_types_expand_20210913.xml') xml_file_name = os.getenv('PHRASE_TYPES_EXPAND_FILE_NAME', default='phrase_types_expand_20210913.xml')
xml_file = os.path.join(BASE_DIR, 'data', 'walenty', xml_file_name)
xml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), xml_file) xml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), xml_file)
parser = make_parser() parser = make_parser()
......
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment