parent
42a3f773a9
commit
71de08ffed
@ -1,8 +1,8 @@
|
||||
FROM python:3.10.12
|
||||
ADD . /stark-web
|
||||
WORKDIR /stark-web
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install waitress
|
||||
RUN pip install .
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install waitress && \
|
||||
pip install .
|
||||
|
||||
CMD ["waitress-serve", "--call", "app:create_app"]
|
||||
|
@ -1,2 +1,28 @@
|
||||
# Translations
|
||||
## Create .pot file
|
||||
pybabel extract -F babel.cfg -o messages.pot .
|
||||
|
||||
## Create language .po files
|
||||
pybabel init -i messages.pot -d translations -l en
|
||||
pybabel init -i messages.pot -d translations -l sl
|
||||
|
||||
## Compile changes
|
||||
pybabel compile -d translations
|
||||
|
||||
## Update commands
|
||||
Install gettext (sudo apt install gettext)
|
||||
|
||||
```shell
|
||||
pybabel extract -F babel.cfg -o messages.pot .
|
||||
msgmerge translations/sl/LC_MESSAGES/messages.po messages.pot -o translations/sl/LC_MESSAGES/messages.po
|
||||
msgmerge translations/en/LC_MESSAGES/messages.po messages.pot -o translations/en/LC_MESSAGES/messages.po
|
||||
|
||||
# check and delete fuzzy in .po files
|
||||
pybabel compile -d translations
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Deployment
|
||||
docker build -t my-flask-app .
|
||||
docker run -p 8080:8080 my-flask-app
|
@ -0,0 +1,226 @@
|
||||
# Translations template for PROJECT.
|
||||
# Copyright (C) 2024 ORGANIZATION
|
||||
# This file is distributed under the same license as the PROJECT project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2024-02-19 09:57+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.14.0\n"
|
||||
|
||||
#: app.py:202 app.py:203
|
||||
msgid "Please insert either input url or file, not both of them."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:213
|
||||
msgid "Incorrect URL!"
|
||||
msgstr ""
|
||||
|
||||
#: app.py:215 app.py:216
|
||||
msgid "Please insert either input url or provide a file."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:228
|
||||
msgid "Please provide information about minimum and maximum tree size."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:232
|
||||
msgid "Tree size minimum should be smaller than tree size maximum."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:243
|
||||
msgid "Please select at least one node type."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:248
|
||||
msgid "Node option"
|
||||
msgstr ""
|
||||
|
||||
#: app.py:248
|
||||
msgid "is not supported. Please enter valid options."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:292
|
||||
msgid "Please insert an Integer."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:316
|
||||
msgid ""
|
||||
"Processing failed! Please recheck your settings, e.g. input format or "
|
||||
"head node description."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:325 templates/about.html:16 templates/about.html:18
|
||||
#: templates/index.html:16 templates/index.html:18 templates/index.html:30
|
||||
#: templates/result.html:16 templates/result.html:18
|
||||
msgid "code"
|
||||
msgstr ""
|
||||
|
||||
#: templates/about.html:18 templates/about.html:29 templates/index.html:18
|
||||
#: templates/result.html:18
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: templates/about.html:19 templates/index.html:19 templates/result.html:19
|
||||
msgid "switch_link"
|
||||
msgstr ""
|
||||
|
||||
#: templates/about.html:20 templates/index.html:20 templates/result.html:20
|
||||
msgid "switch_code"
|
||||
msgstr ""
|
||||
|
||||
#: templates/about.html:30
|
||||
msgid "about_description"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:29
|
||||
msgid "intro_description"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:31
|
||||
msgid "Input data"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:34
|
||||
msgid "Upload a treebank"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:34
|
||||
msgid "in CONLL-U format"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:34 templates/index.html:62 templates/index.html:70
|
||||
#: templates/index.html:110 templates/index.html:125 templates/index.html:141
|
||||
#: templates/index.html:158 templates/index.html:168
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:37
|
||||
msgid "Browse"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:41
|
||||
msgid "Upload"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:50
|
||||
msgid "Or"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:50
|
||||
msgid "insert a URL link to a treebank in CONLL-U format"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:50
|
||||
msgid "Example"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:59
|
||||
msgid "Tree specification"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:62
|
||||
msgid "Tree size"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:62
|
||||
msgid "number of tokens in the tree"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:70
|
||||
msgid "Node type"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:70
|
||||
msgid "token characteristics to consider"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:76
|
||||
msgid "Part-of-speech"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:85
|
||||
msgid "Lemma"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:91
|
||||
msgid "Form"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:105
|
||||
msgid "Advanced settings"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:110
|
||||
msgid "Labeled trees"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:110
|
||||
msgid "include names of dependency relations"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:114 templates/index.html:129 templates/index.html:145
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:117 templates/index.html:132 templates/index.html:148
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:125
|
||||
msgid "Fixed order"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:125
|
||||
msgid "differentiate trees based on surface word order"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:141
|
||||
msgid "Association measures"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:141
|
||||
msgid "print MI, logDice and t-score"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:158
|
||||
msgid "Frequency threshold"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:158
|
||||
msgid "specify the minimum frequency of a tree in the treebank"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:168
|
||||
msgid "Head"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:168
|
||||
msgid "specify potential restrictions on the head node"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:179
|
||||
msgid "Submit"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:187
|
||||
msgid "No results"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:188
|
||||
msgid "Processing with your settings didnt produce any results!"
|
||||
msgstr ""
|
||||
|
||||
#: templates/result.html:30
|
||||
msgid "Download complete results"
|
||||
msgstr ""
|
||||
|
@ -1,3 +1,4 @@
|
||||
Flask==3.0.0
|
||||
requests==2.31.0
|
||||
flask-babel==4.0.0
|
||||
stark @ git+https://github.com/clarinsi/STARK@eff0c8609c9acc2bc0b096339e91e71430cbf762
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,231 @@
|
||||
# Copyright (C) 2024 ORGANIZATION
|
||||
# This file is distributed under the same license as the PROJECT project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2024-02-19 09:57+0100\n"
|
||||
"PO-Revision-Date: 2024-02-14 14:36+0100\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: sl <LL@li.org>\n"
|
||||
"Language: sl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
|
||||
"n%100==4 ? 2 : 3);\n"
|
||||
"Generated-By: Babel 2.14.0\n"
|
||||
|
||||
#: app.py:202 app.py:203
|
||||
msgid "Please insert either input url or file, not both of them."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:213
|
||||
msgid "Incorrect URL!"
|
||||
msgstr ""
|
||||
|
||||
#: app.py:215 app.py:216
|
||||
msgid "Please insert either input url or provide a file."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:228
|
||||
msgid "Please provide information about minimum and maximum tree size."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:232
|
||||
msgid "Tree size minimum should be smaller than tree size maximum."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:243
|
||||
msgid "Please select at least one node type."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:248
|
||||
msgid "Node option"
|
||||
msgstr "Vrsta vozlišč"
|
||||
|
||||
#: app.py:248
|
||||
msgid "is not supported. Please enter valid options."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:292
|
||||
msgid "Please insert an Integer."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:316
|
||||
msgid ""
|
||||
"Processing failed! Please recheck your settings, e.g. input format or head "
|
||||
"node description."
|
||||
msgstr ""
|
||||
|
||||
#: app.py:325 templates/about.html:16 templates/about.html:18
|
||||
#: templates/index.html:16 templates/index.html:18 templates/index.html:30
|
||||
#: templates/result.html:16 templates/result.html:18
|
||||
msgid "code"
|
||||
msgstr "sl"
|
||||
|
||||
#: templates/about.html:18 templates/about.html:29 templates/index.html:18
|
||||
#: templates/result.html:18
|
||||
msgid "About"
|
||||
msgstr "O orodju"
|
||||
|
||||
#: templates/about.html:19 templates/index.html:19 templates/result.html:19
|
||||
msgid "switch_link"
|
||||
msgstr "?lang=en"
|
||||
|
||||
#: templates/about.html:20 templates/index.html:20 templates/result.html:20
|
||||
msgid "switch_code"
|
||||
msgstr "EN"
|
||||
|
||||
#: templates/about.html:30
|
||||
msgid "about_description"
|
||||
msgstr ""
|
||||
"Tukaj je opis pod 'O orodju', v katerem povemo več. Dodamo čisto na koncu."
|
||||
|
||||
#: templates/index.html:29
|
||||
msgid "intro_description"
|
||||
msgstr ""
|
||||
"Tukaj je opis na vstopni spletni strani, ki pa ga Kaja pripravi šele na "
|
||||
"koncu, ko bo tudi jasno, ali ga sploh potrebujemo. Če se zdi uporaba "
|
||||
"intuitivna na prvi pogled, lahko po vzoru drugih orodij CJVT vse skupaj "
|
||||
"premaknemo pod About."
|
||||
|
||||
#: templates/index.html:31
|
||||
msgid "Input data"
|
||||
msgstr "Vhodni podatki"
|
||||
|
||||
#: templates/index.html:34
|
||||
msgid "Upload a treebank"
|
||||
msgstr "Naloži korpus"
|
||||
|
||||
#: templates/index.html:34
|
||||
msgid "in CONLL-U format"
|
||||
msgstr "v formatu CONLL-U"
|
||||
|
||||
#: templates/index.html:34 templates/index.html:62 templates/index.html:70
|
||||
#: templates/index.html:110 templates/index.html:125 templates/index.html:141
|
||||
#: templates/index.html:158 templates/index.html:168
|
||||
msgid "Help"
|
||||
msgstr "Pomoč"
|
||||
|
||||
#: templates/index.html:37
|
||||
msgid "Browse"
|
||||
msgstr "Izberi"
|
||||
|
||||
#: templates/index.html:41
|
||||
msgid "Upload"
|
||||
msgstr "Naloži datoteko"
|
||||
|
||||
#: templates/index.html:50
|
||||
msgid "Or"
|
||||
msgstr "Ali"
|
||||
|
||||
#: templates/index.html:50
|
||||
msgid "insert a URL link to a treebank in CONLL-U format"
|
||||
msgstr "prilepi povezavo URL do korpusa v formatu CONLL-U"
|
||||
|
||||
#: templates/index.html:50
|
||||
msgid "Example"
|
||||
msgstr "Primer"
|
||||
|
||||
#: templates/index.html:59
|
||||
msgid "Tree specification"
|
||||
msgstr "Opredelitev dreves"
|
||||
|
||||
#: templates/index.html:62
|
||||
msgid "Tree size"
|
||||
msgstr "Velikost drevesa"
|
||||
|
||||
#: templates/index.html:62
|
||||
msgid "number of tokens in the tree"
|
||||
msgstr "število vozlišč (pojavnic) v drevesu"
|
||||
|
||||
#: templates/index.html:70
|
||||
msgid "Node type"
|
||||
msgstr "Vrsta vozlišč"
|
||||
|
||||
#: templates/index.html:70
|
||||
msgid "token characteristics to consider"
|
||||
msgstr "upoštevane lastnosti pojavnic"
|
||||
|
||||
#: templates/index.html:76
|
||||
msgid "Part-of-speech"
|
||||
msgstr "Besedna vrsta"
|
||||
|
||||
#: templates/index.html:85
|
||||
msgid "Lemma"
|
||||
msgstr "Lema"
|
||||
|
||||
#: templates/index.html:91
|
||||
msgid "Form"
|
||||
msgstr "Oblika"
|
||||
|
||||
#: templates/index.html:105
|
||||
msgid "Advanced settings"
|
||||
msgstr "Napredne nastavitve"
|
||||
|
||||
#: templates/index.html:110
|
||||
msgid "Labeled trees"
|
||||
msgstr "Označena drevesa"
|
||||
|
||||
#: templates/index.html:110
|
||||
msgid "include names of dependency relations"
|
||||
msgstr "izpis vrste odvisnostnih relacij med pojavnicami"
|
||||
|
||||
#: templates/index.html:114 templates/index.html:129 templates/index.html:145
|
||||
msgid "No"
|
||||
msgstr "Ne"
|
||||
|
||||
#: templates/index.html:117 templates/index.html:132 templates/index.html:148
|
||||
msgid "Yes"
|
||||
msgstr "Da"
|
||||
|
||||
#: templates/index.html:125
|
||||
msgid "Fixed order"
|
||||
msgstr "Nespremenljiv besedni red"
|
||||
|
||||
#: templates/index.html:125
|
||||
msgid "differentiate trees based on surface word order"
|
||||
msgstr "ločevanje dreves glede na vrstni red pojavnic v besedilu"
|
||||
|
||||
#: templates/index.html:141
|
||||
msgid "Association measures"
|
||||
msgstr "Mere povezovalnosti"
|
||||
|
||||
#: templates/index.html:141
|
||||
msgid "print MI, logDice and t-score"
|
||||
msgstr "izpiši vrednosti MI, logDice in t-test"
|
||||
|
||||
#: templates/index.html:158
|
||||
msgid "Frequency threshold"
|
||||
msgstr "Frekvenčni prag"
|
||||
|
||||
#: templates/index.html:158
|
||||
msgid "specify the minimum frequency of a tree in the treebank"
|
||||
msgstr "najmanjše število pojavitev drevesa v korpusu"
|
||||
|
||||
#: templates/index.html:168
|
||||
msgid "Head"
|
||||
msgstr "Jedro"
|
||||
|
||||
#: templates/index.html:168
|
||||
msgid "specify potential restrictions on the head node"
|
||||
msgstr "zamejitev izpisa glede na lastnosti jedrne pojavnice"
|
||||
|
||||
#: templates/index.html:179
|
||||
msgid "Submit"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:187
|
||||
msgid "No results"
|
||||
msgstr ""
|
||||
|
||||
#: templates/index.html:188
|
||||
msgid "Processing with your settings didnt produce any results!"
|
||||
msgstr ""
|
||||
|
||||
#: templates/result.html:30
|
||||
msgid "Download complete results"
|
||||
msgstr "Prenesi datoteko s celotnimi rezultati"
|
Loading…
Reference in new issue