Feature #1506
RCP: 0.7.7, use CQL @ marker in the Cooccurrence command
Statut: | Closed | Début: | 02/09/2015 | |
---|---|---|---|---|
Priorité: | Urgent | Echéance: | ||
Assigné à: | - | % réalisé: | 100% |
|
Catégorie: | Commands | Temps passé: | - | |
Version cible: | TXM 0.8.0 |
Description
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.
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)
.
In some cases the target is not resolved (exemple : "je"
[] [frpos=[V.+"]).
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.- if the target is not resolve show <null> or <vide> or <>
- if the target is not resolved, no highlight or wrapping is done
Solution 2¶
Usage can be extended to six available ranges:- a) 'start'
- b) range 'start - before target'
- c) 'target'
- d) range 'after target - end'
- e) 'end'
- f) range 'start - end'
Commands could offer various ways to use those different ranges as arguments.
The range selection UI could lool like :
SELECT: frpos/frlemma
FROM: start ... target ... end
[ ] ( ] [ ] [ ) [ ]
WHERE: [ CQL query ]
Solution 3¶
CQP seems to offer more markers to use.
The full list provided by CQi is:
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
Usage can be extended to the use of targets 0 to 9 and keyword.
Demandes liées
Historique
#1 Mis à jour par Sebastien Jacquot il y a plus de 7 ans
- Version cible changé de TXM 0.8.0a (split/restructuration) à TXM 0.8.0
#2 Mis à jour par Matthieu Decorde il y a environ 7 ans
- % réalisé changé de 0 à 80
#3 Mis à jour par Sebastien Jacquot il y a plus d'un an
- % réalisé changé de 80 à 100
#4 Mis à jour par Sebastien Jacquot il y a plus d'un an
- Statut changé de New à Closed