[CWB] Refetching some concordances

Serge Heiden slh at ens-lyon.fr
Fri Apr 8 15:49:52 CEST 2011


Hi Jan,

Why don't you just encode explicitely your word cpos id
into your words so that you can query them at anytime from inside CQP ?
It is a bit brute force practice, but can answer the
problem for small corpora.

Best,
Serge

le 08/04/2011 15:20 Selon Jan Jona Javorsek:
> Hello,
>
> I am having a similar problem, but in a different context.
>
> So there we go again: "Is there any way to refetch match using its cpos id?"
>
> I am listing reduced matches (in a web frontend) and I want to make it
> possible for the users to click on a match and refetch it with wider
> context (paragraph, for example).
>
> Without the reduce, one can reissue the query with approporate offset,
> but with reduce, I don't know how to do that without cpos.
>
> Thank you :-)
>
> -jan
>
>
> On 01/24/2011 03:10 PM, Alberto Simões wrote:
>> Thank you, Andrew
>>
>> Easy and Clean :)
>>
>> On 24/01/2011 12:24, Hardie, Andrew wrote:
>>> Since concordance hits can be more than one word you actually need
>>> (at least) two cpos's -- match and matchend. If you keep track of the
>>> match and matchend of your selected hits, those can be re-loaded to
>>> create a query that has just those selected hits in it (or just one
>>> hit if you like).
>>>
>>> You can use the CQP::undump method for this. Its documentation is
>>> fairly clear. I think the easiest way to go would be to ::dump your
>>> original query, edit the contents of the dump to match onkly the
>>> selected hits, (then save somewhere and reload another time... ) then
>>> ::undump when you need it again.
>>>
>>> Andrew.
>>>
>>> -----Original Message-----
>>> From: cwb-bounces at sslmit.unibo.it
>>> [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Alberto Simões
>>> Sent: 24 January 2011 12:12
>>> To: Open source development of the Corpus WorkBench
>>> Subject: [CWB] Refetching some concordances
>>>
>>>
>>> Hello,
>>>
>>> Is there any way to refetch a concordance using its cpos id?
>>>
>>> That is: I need to let the user see a list (big list) of concordances,
>>> and select some. I need to save that list for future use. Isn't the cpos
>>> id enough?
>>>
>>> Thank you :)
>>>
>>> Alberto
>>
>
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb

-- 
Dr. Serge Heiden, slh at ens-lyon.fr, http://textometrie.ens-lyon.fr
ENS de Lyon/CNRS - ICAR UMR5191, Institut de Linguistique Française
15, parvis René Descartes 69342 Lyon BP7000 Cedex, tél. +33(0)622003883


More information about the CWB mailing list