Feature #1468

Updated by Matthieu Decorde over 3 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 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)@.

In some cases the @ target is not resolved (exemple : "je" @[] [frpos=[V.+"]).

h3. Solution 1

If a target position is available in the results list:
* Index: 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.
** if the target is not resolve show <null> or <vide> or <>

h3. Validation test

* Run an Index on VOEUX with query : @[frpos="NOM"] [frpos="ADJ"]@

The result should be
personnes âgées 11
année nouvelle 9
intérêts particuliers 9
* and with query : @[frpos="NOM"] @[frpos="ADJ"]@
The resutl should be
économique 40
française 37
nationale 35