Feature #1468

Updated by Serge Heiden about 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="A.*"] [frlemma="pays"]@ @[frpos="NOM"] [frpos="ADJ"]@
The result should be
<pre>
grand pays personnes âgées 4 11
autre pays année nouvelle 2 9
vieux pays intérêts particuliers 2
glorieux pays 1
grands pays 1
propres pays 1
vigoureux pays 1
9
</pre>
* and with query : @ @@@[frpos="A.*"] [frlemma="pays"]@ @[frpos="NOM"] @[frpos="ADJ"]@
The result resutl should be
<pre>
grand économique 4 40
autre française 2 37
vieux nationale 2
glorieux 1
grands 1
propres 1
vigoureux 1
35
</pre>

Back