lexonomy icon indicating copy to clipboard operation
lexonomy copied to clipboard

Custom concordance queries for additional search elements

Open blahma opened this issue 7 years ago • 2 comments

Recently, support for Additional search elements has been added in the Sketch Engine connection configuration. This produces an extra "serch in Sketch Engine" link next to specified elements, such as next to each inflected within an entry for a lemma.

Currently, clicking "Show concordance" next to such an additional element opens a simple query with the value of that element. However, I need to be able to specify a custom concordance query (like it is already possible for the "main" entry's search) which could combine the value of the particular element with values of other elements in the entry. Concrete example for element field: [lempos="%(lemma)-%(pos)" & word="%(form)"] – to make sure that only such occurences of an inflected form will be shown where it truly belongs to the lempos whose entry we are editing.

It should be noted that there can be several field elements in the entry and in that case the value of the current one (the one next to which I have clicked the button) should be used.

blahma avatar Apr 11 '19 10:04 blahma

This get's too complex and I'm not sure whether actually my initial implementation is the right way to go. People need to be able to link arbitrary things, so I've now (in 806c7cd42d55b9a03f1250174a740f377d516f64) modified attribute handling so that attributes starting with "http://" or "https://" are automatically turned into links. So the best way to go for the moment is to generate an attribute with the right URL directly into the data.

mjakubicek avatar Apr 12 '19 18:04 mjakubicek

A custom editing widget might be a good solution for many of these use cases. Requires more thinking.

mjakubicek avatar Apr 24 '19 14:04 mjakubicek