Skip to content

Commit

Permalink
Merge pull request #5401 from czcorpus/col_lemma_upgr_b
Browse files Browse the repository at this point in the history
col_lemma - additional argument 'p' for more precise specification
  • Loading branch information
tomachalek authored Oct 19, 2022
2 parents 5764673 + dc8efcf commit b339590
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/plugins/ucnk_backlinks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ def col_lemma(self, req):
raise UserActionException('Missing parameter "cl"')
if self.args.corpname not in ('syn_v11', ):
raise UserActionException('Function not supported in {}'.format(self.args.corpname))
self.args.q = [
'q[col_lemma="{cl}"][]*[col_lemma="{cl}"] within <s />'.format(cl=cl),
'D',
'f']
self.args.q = ['q[col_lemma="{cl}"][]*[col_lemma="{cl}"] within <s />'.format(cl=cl)]
pf = req.args.get('p')
if pf:
self.args.q.append(f'p0 0 1 [lemma="{pf}"]')
self.args.q.extend(['D', 'f'])
self.args.refs = '=doc.title,=doc.pubyear'
self.args.pagesize = 50
self.args.attrs = 'word'
Expand Down

0 comments on commit b339590

Please sign in to comment.