mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development
This commit is contained in:
		@@ -93,7 +93,7 @@ def corpus_analysis_inspect_match(payload):
 | 
			
		||||
    try:
 | 
			
		||||
        corpus = client.corpora.get('CORPUS')
 | 
			
		||||
        s = corpus.structural_attributes.get('s')
 | 
			
		||||
        payload = s.export(payload['first_cpos'], payload['last_cpos'], context=3)
 | 
			
		||||
        payload = s.export(payload['first_cpos'], payload['last_cpos'], context=10)
 | 
			
		||||
        payload['cpos_ranges'] = True
 | 
			
		||||
    except cqi.errors.CQiException as e:
 | 
			
		||||
        payload = {'code': e.code, 'desc': e.description, 'msg': e.name}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ from flask_wtf import FlaskForm
 | 
			
		||||
from werkzeug.utils import secure_filename
 | 
			
		||||
from wtforms import (BooleanField, FileField, StringField, SubmitField,
 | 
			
		||||
                     ValidationError, IntegerField, SelectField)
 | 
			
		||||
from wtforms.validators import DataRequired, Length
 | 
			
		||||
from wtforms.validators import DataRequired, Length, NumberRange
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class AddCorpusFileForm(FlaskForm):
 | 
			
		||||
@@ -97,19 +97,9 @@ class DisplayOptionsForm(FlaskForm):
 | 
			
		||||
class InspectDisplayOptionsForm(FlaskForm):
 | 
			
		||||
    expert_mode_inspect = BooleanField('Expert mode')
 | 
			
		||||
    highlight_sentences = BooleanField('Highlight sentences')
 | 
			
		||||
    context_sentences = SelectField('Context sentences',
 | 
			
		||||
                                    choices=[('', 'Choose your option'),
 | 
			
		||||
                                             ('1', '1'),
 | 
			
		||||
                                             ('2', '2'),
 | 
			
		||||
                                             ('3', '3'),
 | 
			
		||||
                                             ('4', '4'),
 | 
			
		||||
                                             ('5', '5'),
 | 
			
		||||
                                             ('6', '6'),
 | 
			
		||||
                                             ('7', '7'),
 | 
			
		||||
                                             ('8', '8'),
 | 
			
		||||
                                             ('9', '9'),
 | 
			
		||||
                                             ('10', '10')],
 | 
			
		||||
                                    default=3)
 | 
			
		||||
    context_sentences = IntegerField('Context sentences',
 | 
			
		||||
                                     validators=[NumberRange(min=0, max=10)],
 | 
			
		||||
                                     default=3)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class QueryDownloadForm(FlaskForm):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user