Feature #1124

Updated by Matthieu Decorde almost 6 years ago

See #943

Currently "text" is the only structure used to cut concordance contexts.
* We must be able to cut several structures (for example "text" or "plu" & "deplu" or "p")
* The import parameters defines which structures to cut in the concordance
** Step 1: add "context_limit" parameter to "import.xml" file.
*** default text value is "text"
*** default @type value is "list"
*** can contain multiple values (ex: "text,plu,deplu")
*** if @type="list", the context limit query will be <struct1>[]|<struct2>[]|...|<strucN>[]
*** if @type="query", text value must be a CQL query
** document how to patch "import.xml" for this parameter
** test with Apocalypse corpus
** Step 2: replace patch by complete import parameter interface
*** build an import UI for this parameter with a new section "Commands/Commandes" and the "Concordance context structure limits/Structures de limite de contextes de concordance"
*** save the field in "import.xml"

Add in admin documentation the new import parameter element : uis/ui@command=concordance/context_limit, @type attribute and text value


h3. Validation test - Step 1

* Call concordance on DISCOURS corpus with query "<p> []"
* *exit TXM*
* add the new import configuration in the DISCOURS corpus "import.xml" file (in ~/TXM/corpora/discours)
<pre>
...
<uis>
<ui command="concordance">
<context_limits type="list">text,p</context_limits>
</ui>
</uis>
...
</pre>
* *re-start TXM*
* Call concordance on DISCOURS corpus with query "<p> []", ensure left contexts are empty

h3. Validation test - Step 2 (using UI)

* Call concordance on DISCOURS corpus with query "<p> []"
* open the import parameters
* select the DISCOURS corpus source folders
* in the "Commands preferences" section, set the "concordance context structure limits to "p" (list of structure separated by comma)
* start the import
* Call concordance on DISCOURS corpus with query "<p> []", ensure left contexts are empty

Back