[CWB] Refetching some concordances

Jan Jona Javorsek jona.javorsek at ijs.si
Fri Apr 8 15:20:48 CEST 2011


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
>



More information about the CWB mailing list