Page 1 of 1

Concordance view

Posted: Wed Mar 08, 2006 3:14 pm
by rjshelq
Hi,

In addition to Webinator's standard results format, I need to create an additional, optional, results format that rather than showing just one example of the usage from a given document, will list every (or perhaps up to 10 or 20) occurance of the query term(s) in each document, presented with a relatively few (perhaps 20) words of context for every occurance.

Do you have any scripts available that would provide such a "Concordance" view?

Or, if not, could you sketch out a simple pseudo-code outline of the most practical way to implement a Concordance View? (I'm still quite new to Webinator.. so please assume that I know very little about a search script)

Thanks.

Concordance view

Posted: Wed Mar 08, 2006 4:11 pm
by John
You would want to use the mminfo function in the select with a variable constructed in a similar manner to $mmfmt, but with a wider within, e.g. w/20.

$fields holds the fields to select, so you would add something like:

mminfo($concfmt, Body, 20) Concordance

to get the first 20 hits in the $Concordance variable. $concfmt would be the variable described above similar to $mmfmt.