Feature #1468

Updated by Matthieu Decorde almost 4 years ago

When a CQL contains an '@@@' marker, like in for example "'je' @@@[pos='V.*']", the result match list contains three columns named CQI_CONST_FIELD_MATCH (start), CQI_CONST_FIELD_MATCHEND (end) and CQI_CONST_FIELD_TARGET (target: corresponding to the position of the match marked by '@@@' in the query, that is the verbs in the sample query).

See a complete example usage in Groovy in the "CQi tutorial":https://groupes.renater.fr/wiki/txm-info/tutoriel_cqi?s[]=cqi#executer_une_requete_cql_sur_le_corpus_discours_et_utiliser_les_resultats.

The Index, Concordance and Cooccurrence commands must use the target position in their arguments if it is present in the queries.

A command can test if an '@@@' target was expressed in the query by using the following test code on the results list: @CQI_CQP_SUBCORPUS_HAS_FIELD("DISCOURS:RES1", CQI_CONST_FIELD_TARGET)@.

h3. Solution 1

If a target position is available in the results list:
* Index, Cooccurrence: must focus the calculus only on the position marked by the @@@ target, ignoring the other positions. In the case of the example query, the Index builds the hierarchical lexicon of the verbs only.
* Concordance: optionally,
** a) must fill the pivot column only with the position marked by the @@@ target
** OR b) wrap with "%" the position marked by the @@@ target in the pivot column text value
** OR c)
highlight the position marked by the @@@ target in the pivot column (for example in bold). In that case the BackToText action could also highlight differently the position marked by the @@@ target in the edition

h3. Solution 2

Usage can be extended to three available ranges:
* a) range 'start - before target'
* b) range 'target'
* c) range 'after target - end'

Commands could offer various ways to use those different ranges as arguments.

h3. Solution 3

CQP seems to offer more markers to use.

The full list provided by CQi is:
<pre>
CQI_CONST_FIELD_MATCH
CQI_CONST_FIELD_MATCHEND
CQI_CONST_FIELD_TARGET_0
CQI_CONST_FIELD_TARGET_1
CQI_CONST_FIELD_TARGET_2
CQI_CONST_FIELD_TARGET_3
CQI_CONST_FIELD_TARGET_4
CQI_CONST_FIELD_TARGET_5
CQI_CONST_FIELD_TARGET_6
CQI_CONST_FIELD_TARGET_7
CQI_CONST_FIELD_TARGET_8
CQI_CONST_FIELD_TARGET_9
CQI_CONST_FIELD_TARGET
CQI_CONST_FIELD_KEYWORD
</pre>

Usage can be extended to the use of targets 0 to 9 and keyword.

Back