[CWB] Sketch Grammars and macros
Philipp Heinrich
philipp.heinrich at fau.de
Fri Jan 31 11:42:48 CET 2020
Am 31.01.20 um 08:21 schrieb Stefan Evert:
> 4) If you _really_ need more than two marked positions inside the query, you can use additional markers @2 … @9. However, only _two_ of them can be active at the same time, controlled by "set AnchorNumberTarget …" and "set AnchorNumberKeyword …". By re-running the same query several times with different settings of these options, you can build a table with the positions of all markers.
>
> We use this strategy in our own work, supported by a small Python wrapper script. If you're sure that the matches of your query cannot overlap, you can speed up the process by executing the follow-up runs as anchored subqueries (but you need to know what you're doing).
>
If you want to work with queries with more than two marked positions and
you're familiar with python, you might want to use the cwb-ccc package,
which you can install via pip from PyPI (https://pypi.org/project/cwb-ccc/):
pip install cwb-ccc
Have a look at the df_anchor_from_query() method from ccc.cwb.CWBEngine
to directly work with corpus positions.
Best,
Philipp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20200131/d70ad56b/attachment.html>
More information about the CWB
mailing list