From 73a597fdd2022913cdbdea685f457243a06f56fb Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Mon, 26 Oct 2020 12:47:06 +0100 Subject: [PATCH] Rework service package --- .../templates/services/_nav_content.html.j2 | 10 + .../services/corpus_analysis.html.j2 | 176 +++++++------ web/app/templates/services/file-setup.html.j2 | 101 ++++---- web/app/templates/services/nlp.html.j2 | 185 +++++++------- web/app/templates/services/ocr.html.j2 | 237 ++++++++++-------- web/app/templates/services/roadmap.html.j2 | 20 -- web/app/templates/utils/macros.html.j2 | 37 --- 7 files changed, 390 insertions(+), 376 deletions(-) create mode 100644 web/app/templates/services/_nav_content.html.j2 delete mode 100644 web/app/templates/services/roadmap.html.j2 delete mode 100644 web/app/templates/utils/macros.html.j2 diff --git a/web/app/templates/services/_nav_content.html.j2 b/web/app/templates/services/_nav_content.html.j2 new file mode 100644 index 00000000..d11e439e --- /dev/null +++ b/web/app/templates/services/_nav_content.html.j2 @@ -0,0 +1,10 @@ + diff --git a/web/app/templates/services/corpus_analysis.html.j2 b/web/app/templates/services/corpus_analysis.html.j2 index e50cab77..633e40c1 100644 --- a/web/app/templates/services/corpus_analysis.html.j2 +++ b/web/app/templates/services/corpus_analysis.html.j2 @@ -1,99 +1,115 @@ {% extends "nopaque.html.j2" %} +{% from '_constants.html.j2' import COLORS %} -{% set main_class = 'corpus-analysis-color lighten' %} +{% set scheme_color = COLORS.corpus_analysis %} + +{% block nav_content %} +{% include 'services/_nav_content.html.j2' %} +{% endblock nav_content %} + +{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %} {% block page_content %} -{{ Macros.insert_color_scheme(corpus_analysis_color_darken) }} +
+
+
+

 

+

{{ title }}

+
-
-
- - - -
-
- -
-

{{ rgb }}

-

Nopaque lets you create and upload as many text corpora as you want. It makes use of CQP Query Language, which allows for complex search requests with the aid of metadata and NLP tags. The results can either be displayed as text or abstract visualizations.

-
- -
-

My Corpora

-
-
-
- search - - +
+ -
    - - - - - - - - - - -
    - Title - Description - Status
    -
      - -
      -
      -
      -

      My query results

      -
      -
      -
      - search - - +
      +

      Nopaque lets you create and upload as many text corpora as you want. It makes use of CQP Query Language, which allows for complex search requests with the aid of metadata and NLP tags. The results can either be displayed as text or abstract visualizations.

      +
      + +
      +

      My Corpora

      +
      +
      +
      + search + + +
      +
        + + + + + + + + + + +
        + Title + Description + Status
        +
          +
          +
          -
            - - - - - - - - - - - - - -
            - Title and
            - Description -
            - Corpus and
            - Query -
            {# Actions #}
            - folderNothing here... -

            No query results yet imported.

            -
            -
              -
              - Add query resultfile_upload + +
              +

              My query results

              +
              +
              +
              + search + + +
              +
                + + + + + + + + + + + + + +
                + Title and
                + Description +
                + Corpus and
                + Query +
                {# Actions #}
                + folderNothing here... +

                No query results yet imported.

                +
                +
                  +
                  + +
                  +{% endblock %} +{% block scripts %} +{{ super() }} -{% endblock %} +{% endblock scripts %} diff --git a/web/app/templates/services/file-setup.html.j2 b/web/app/templates/services/file-setup.html.j2 index 475a00d6..dfdb0930 100644 --- a/web/app/templates/services/file-setup.html.j2 +++ b/web/app/templates/services/file-setup.html.j2 @@ -1,60 +1,75 @@ {% extends "nopaque.html.j2" %} +{% import 'materialize/wtf.html.j2' as wtf %} +{% from '_constants.html.j2' import COLORS %} -{% set main_class = 'file-setup-color lighten' %} +{% set scheme_color = COLORS.file_setup_darken %} + +{% block nav_content %} +{% include 'services/_nav_content.html.j2' %} +{% endblock nav_content %} + +{% block main_attribs %} class="file-setup-color lighten"{% endblock main_attribs %} {% block page_content %} -{{ Macros.insert_color_scheme(file_setup_color_darken) }} +
                  +
                  +
                  +

                   

                  +

                  {{ title }}

                  +
                  -
                  -
                  -

                   

                  -

                   

                  - - - -
                  -
                  +
                  +
                  +

                   

                  +

                   

                  + + + +
                  +
                  -
                  -
                  -
                  -
                  -
                  -
                  - layersMerge process -

                  nopaque converts and merges your files in its cloud infrastructure to facilitate further processing and the application of other services. You only have to number your files in the correct order to receive a PDF file.

                  +
                  +
                  +
                  +
                  +
                  +
                  + layersMerge process +

                  nopaque converts and merges your files in its cloud infrastructure to facilitate further processing and the application of other services. You only have to number your files in the correct order to receive a PDF file.

                  +
                  +
                  -
                  -
                  -
                  -

                  Submit a job

                  -
                  -
                  -
                  - {{ add_job_form.hidden_tag() }} -
                  -
                  - {{ M.render_field(add_job_form.title, data_length='32', material_icon='title') }} +
                  +

                  Submit a job

                  +
                  + +
                  + {{ add_job_form.hidden_tag() }} +
                  +
                  + {{ wtf.render_field(add_job_form.title, data_length='32', material_icon='title') }} +
                  +
                  + {{ wtf.render_field(add_job_form.description, data_length='255', material_icon='description') }} +
                  +
                  + {{ wtf.render_field(add_job_form.files, accept='image/jpeg, image/png, image/tiff', placeholder='Choose your .jpeg, .png or .tiff files') }} +
                  +
                  + {{ wtf.render_field(add_job_form.version, material_icon='apps') }} +
                  +
                  -
                  - {{ M.render_field(add_job_form.description, data_length='255', material_icon='description') }} +
                  + {{ wtf.render_field(add_job_form.submit, material_icon='send') }}
                  -
                  - {{ M.render_field(add_job_form.files, accept='image/jpeg, image/png, image/tiff', placeholder='Choose your .jpeg, .png or .tiff files') }} -
                  -
                  - {{ M.render_field(add_job_form.version, material_icon='apps') }} -
                  -
                  +
                  -
                  - {{ M.render_field(add_job_form.submit, material_icon='send') }} -
                  - +
                  diff --git a/web/app/templates/services/nlp.html.j2 b/web/app/templates/services/nlp.html.j2 index de1380ce..dafca7e0 100644 --- a/web/app/templates/services/nlp.html.j2 +++ b/web/app/templates/services/nlp.html.j2 @@ -1,102 +1,117 @@ {% extends "nopaque.html.j2" %} +{% import 'materialize/wtf.html.j2' as wtf %} +{% from '_constants.html.j2' import COLORS %} -{% set main_class = 'nlp-color lighten' %} +{% set scheme_color = COLORS.nlp_darken %} + +{% block nav_content %} +{% include 'services/_nav_content.html.j2' %} +{% endblock nav_content %} + +{% block main_attribs %} class="nlp-color lighten"{% endblock main_attribs %} {% block page_content %} -{{ Macros.insert_color_scheme(nlp_color_darken) }} +
                  +
                  +
                  +

                   

                  +

                  {{ title }}

                  +
                  -
                  -
                  -

                   

                  -

                   

                  - - - -
                  -
                  +
                  +
                  +

                   

                  +

                   

                  + + + +
                  +
                  -
                  -
                  -
                  -
                  -
                  -
                  - layersTokenization -

                  Your text is split up into sentences and words, so called tokens, which can then be analyzed.

                  -
                  -
                  -
                  -
                  - layersLemmatization -

                  All inflected forms of a word are grouped together so that it can be analyzed as a single item.

                  -
                  -
                  -
                  -
                  - layersPart-of-speech Tagging -

                  In accordance with its definition and context, each word is marked up as corresponding to a particular part of speech.

                  -
                  -
                  -
                  -
                  - layersNamed-Entity Recognition -

                  Named entities are located and classified into specific categories like persons or locations.

                  +
                  +
                  +
                  +
                  +
                  +
                  + layersTokenization +

                  Your text is split up into sentences and words, so called tokens, which can then be analyzed.

                  +
                  +
                  +
                  +
                  + layersLemmatization +

                  All inflected forms of a word are grouped together so that it can be analyzed as a single item.

                  +
                  +
                  +
                  +
                  + layersPart-of-speech Tagging +

                  In accordance with its definition and context, each word is marked up as corresponding to a particular part of speech.

                  +
                  +
                  +
                  +
                  + layersNamed-Entity Recognition +

                  Named entities are located and classified into specific categories like persons or locations.

                  +
                  +
                  -
                  -
                  -
                  -

                  Submit a job

                  -
                  -
                  -
                  - {{ add_job_form.hidden_tag() }} -
                  -
                  - {{ M.render_field(add_job_form.title, data_length='32', material_icon='title') }} -
                  -
                  - {{ M.render_field(add_job_form.description, data_length='255', material_icon='description') }} -
                  -
                  - {{ M.render_field(add_job_form.files, accept='text/plain', placeholder='Choose your .txt files') }} -
                  -
                  - {{ M.render_field(add_job_form.language, material_icon='language') }} -
                  -
                  - {{ M.render_field(add_job_form.version, material_icon='apps') }} -
                  -
                  - Preprocessing -
                  -
                  -

                  {{ add_job_form.check_encoding.label.text }}

                  -

                  If the input files are not created with the nopaque OCR service or you do not know if your text files are UTF-8 encoded, check this switch. We will try to automatically determine the right encoding for your texts to process them.

                  -
                  -
                  -
                  - +
                  +

                  Submit a job

                  +
                  + +
                  + {{ add_job_form.hidden_tag() }} +
                  +
                  + {{ wtf.render_field(add_job_form.title, data_length='32', material_icon='title') }} +
                  +
                  + {{ wtf.render_field(add_job_form.description, data_length='255', material_icon='description') }} +
                  +
                  + {{ wtf.render_field(add_job_form.files, accept='text/plain', placeholder='Choose your .txt files') }} +
                  +
                  + {{ wtf.render_field(add_job_form.language, material_icon='language') }} +
                  +
                  + {{ wtf.render_field(add_job_form.version, material_icon='apps') }} +
                  +
                  + Preprocessing +
                  +
                  +

                  {{ add_job_form.check_encoding.label.text }}

                  +

                  If the input files are not created with the nopaque OCR service or you do not know if your text files are UTF-8 encoded, check this switch. We will try to automatically determine the right encoding for your texts to process them.

                  +
                  +
                  +
                  + +
                  +
                  +
                  - -
                  +
                  + {{ wtf.render_field(add_job_form.submit, material_icon='send') }} +
                  +
                  -
                  - {{ M.render_field(add_job_form.submit, material_icon='send') }} -
                  - +
                  diff --git a/web/app/templates/services/ocr.html.j2 b/web/app/templates/services/ocr.html.j2 index 8b167b2f..0ce9cce1 100644 --- a/web/app/templates/services/ocr.html.j2 +++ b/web/app/templates/services/ocr.html.j2 @@ -1,129 +1,144 @@ {% extends "nopaque.html.j2" %} +{% import 'materialize/wtf.html.j2' as wtf %} +{% from '_constants.html.j2' import COLORS %} -{% set main_class = 'ocr-color lighten' %} +{% set scheme_color = COLORS.ocr_darken %} + +{% block nav_content %} +{% include 'services/_nav_content.html.j2' %} +{% endblock nav_content %} + +{% block main_attribs %} class="ocr-color lighten"{% endblock main_attribs %} {% block page_content %} -{{ Macros.insert_color_scheme(ocr_color_darken) }} +
                  +
                  +
                  +

                   

                  +

                  {{ title }}

                  +
                  -
                  -
                  -

                   

                  -

                   

                  - - - -
                  -
                  +
                  +
                  +

                   

                  +

                   

                  + + + +
                  +
                  -
                  -
                  -
                  -
                  -
                  -
                  - layersOCR -

                  In this process, nopaque converts your image data – like photos or scans – into text data. This step enables you to proceed with the computational analysis of your documents.

                  +
                  +
                  +
                  +
                  +
                  +
                  + layersOCR +

                  In this process, nopaque converts your image data – like photos or scans – into text data. This step enables you to proceed with the computational analysis of your documents.

                  +
                  +
                  -
                  -
                  -
                  -

                  Submit a job

                  -
                  -
                  -
                  - {{ add_job_form.hidden_tag() }} -
                  -
                  - {{ M.render_field(add_job_form.title, data_length='32', material_icon='title') }} -
                  -
                  - {{ M.render_field(add_job_form.description, data_length='255', material_icon='description') }} -
                  -
                  - {{ M.render_field(add_job_form.files, accept='application/pdf', color=ocr_color_darken, placeholder='Choose your .pdf files') }} -
                  -
                  - {{ M.render_field(add_job_form.language, material_icon='language') }} -
                  -
                  - {{ M.render_field(add_job_form.version, material_icon='apps') }} -
                  -
                  - Preprocessing -
                  -
                  -

                  {{ add_job_form.binarization.label.text }}

                  -

                  Based on a brightness threshold pixels are converted into either black or white. It is useful to reduce noise in images. (longer duration)

                  -
                  -
                  -
                  - +
                  +

                  Submit a job

                  +
                  + +
                  + {{ add_job_form.hidden_tag() }} +
                  +
                  + {{ wtf.render_field(add_job_form.title, data_length='32', material_icon='title') }} +
                  +
                  + {{ wtf.render_field(add_job_form.description, data_length='255', material_icon='description') }} +
                  +
                  + {{ wtf.render_field(add_job_form.files, accept='application/pdf', color=ocr_color_darken, placeholder='Choose your .pdf files') }} +
                  +
                  + {{ wtf.render_field(add_job_form.language, material_icon='language') }} +
                  +
                  + {{ wtf.render_field(add_job_form.version, material_icon='apps') }} +
                  +
                  + Preprocessing +
                  +
                  +

                  {{ add_job_form.binarization.label.text }}

                  +

                  Based on a brightness threshold pixels are converted into either black or white. It is useful to reduce noise in images. (longer duration)

                  +
                  +
                  +
                  + +
                  +
                  +

                   

                  +
                  +

                   

                  +
                  +

                  Page range

                  +

                  +
                  +
                  +
                  + +
                  +
                  +

                   

                  +
                  +

                   

                  +
                  +

                  Page rotation

                  +

                  +
                  +
                  +
                  + +
                  +
                  +

                   

                  +
                  +

                   

                  +
                  +

                  Page split

                  +

                  +
                  +
                  +
                  + +
                  +
                  +
                  -

                   

                  -
                  -

                   

                  -
                  -

                  Page range

                  -

                  +
                  + {{ wtf.render_field(add_job_form.submit, color=ocr_color_darken, material_icon='send') }}
                  -
                  -
                  - -
                  -
                  -

                   

                  -
                  -

                   

                  -
                  -

                  Page rotation

                  -

                  -
                  -
                  -
                  - -
                  -
                  -

                   

                  -
                  -

                   

                  -
                  -

                  Page split

                  -

                  -
                  -
                  -
                  - -
                  -
                  - -
                  +
                  -
                  - {{ M.render_field(add_job_form.submit, color=ocr_color_darken, material_icon='send') }} -
                  - +
                  diff --git a/web/app/templates/services/roadmap.html.j2 b/web/app/templates/services/roadmap.html.j2 deleted file mode 100644 index 05b703fe..00000000 --- a/web/app/templates/services/roadmap.html.j2 +++ /dev/null @@ -1,20 +0,0 @@ - - diff --git a/web/app/templates/utils/macros.html.j2 b/web/app/templates/utils/macros.html.j2 deleted file mode 100644 index 54fa671d..00000000 --- a/web/app/templates/utils/macros.html.j2 +++ /dev/null @@ -1,37 +0,0 @@ -{%- macro insert_page_content() -%} - -{% block page_content %}{% endblock %} -{%- endmacro -%} - -{%- macro insert_color_scheme(hex_color) -%} - -{%- endmacro -%}