From 49311f58f03c77eb439f675c20d3745b2ae77aa3 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Wed, 27 Nov 2019 15:56:39 +0100 Subject: [PATCH] Add basic style for expert view --- app/corpora/events.py | 7 +- app/templates/corpora/analyse_corpus.html.j2 | 70 ++++++++++++++++---- 2 files changed, 61 insertions(+), 16 deletions(-) diff --git a/app/corpora/events.py b/app/corpora/events.py index 1298a847..492d69cb 100644 --- a/app/corpora/events.py +++ b/app/corpora/events.py @@ -75,10 +75,11 @@ def corpus_analysis(message): cpos_list = list(set(cpos_list)) pos_list = client.cl_cpos2str('{}.pos'.format(corpus), cpos_list) simple_pos_list = client.cl_cpos2str('{}.simple_pos'.format(corpus), cpos_list) - text_id_list = client.cl_cpos2struc('{}.text_title'.format(corpus), cpos_list) + s_id_list = client.cl_cpos2struc('{}.s'.format(corpus), cpos_list) + text_id_list = client.cl_cpos2struc('{}.text'.format(corpus), cpos_list) word_list = client.cl_cpos2str('{}.word'.format(corpus), cpos_list) - for cpos, pos, simple_pos, text_id, word in zip(cpos_list, pos_list, simple_pos_list, text_id_list, word_list): - data['cpos_lookup'][cpos] = {'pos': pos, 'simple_pos': simple_pos, 'text_id': text_id, 'word': word} + for cpos, pos, simple_pos, s_id, text_id, word in zip(cpos_list, pos_list, simple_pos_list, s_id_list, text_id_list, word_list): + data['cpos_lookup'][cpos] = {'pos': pos, 'simple_pos': simple_pos, 's_id': s_id, 'text_id': text_id, 'word': word} text_author_list = client.cl_struc2str('{}.text_author'.format(corpus), text_id_list) text_publishing_year_list = client.cl_struc2str('{}.text_publishing_year'.format(corpus), text_id_list) text_title_list = client.cl_struc2str('{}.text_title'.format(corpus), text_id_list) diff --git a/app/templates/corpora/analyse_corpus.html.j2 b/app/templates/corpora/analyse_corpus.html.j2 index da81332b..557fb1d8 100644 --- a/app/templates/corpora/analyse_corpus.html.j2 +++ b/app/templates/corpora/analyse_corpus.html.j2 @@ -1,6 +1,21 @@ {% extends "full_width.html.j2" %} {% block page_content %} + +
@@ -36,6 +51,13 @@ {{ error }} {% endfor %}
+
+ +
@@ -69,10 +91,10 @@ - - - - + + + + @@ -103,7 +125,6 @@
TitleLeft contextMatchRight ContextTitleLeft contextMatchRight Context