Add corpus analysis stuff

This commit is contained in:
Stephan Porada
2019-11-06 15:40:43 +01:00
parent 7757c12dc4
commit 08aafb8f99
5 changed files with 38 additions and 3 deletions

View File

@ -54,12 +54,14 @@ def corpus(corpus_id):
def corpus_analysis(corpus_id):
logger = logging.getLogger(__name__)
corpus = Corpus.query.get_or_404(corpus_id)
corpus.status = 'start analysis'
query = request.args.get('query')
logger.warning('Query first: {}'.format(query))
hits_per_page = request.args.get('hits_per_page', 30)
context = request.args.get('context', 10)
dl_form = QueryDownloadForm()
form = QueryForm(hits_per_page=hits_per_page, context=context, query=query)
db.session.commit()
if form.validate_on_submit():
logger = logging.getLogger(__name__)
logger.warning('Data has been sent!')