New snapshot - anywhere in sight?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

New snapshot - anywhere in sight?

Sava Jurisic
Hi Wolf & all,

just curious if new snapshot is close to release?

Thanks,
Sava



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: New snapshot - anywhere in sight?

Dannes Wessels
Read here what you can expect when the new snapshot is released.....
http://wiki.exist-db.org/space/Change+Log

On 10/6/05, Sava Jurisic <sjurisic> wrote:
>
> just curious if new snapshot is close to release?
>
>


--
# Dannes Wessels # The Netherlands #
# Jabber / ICQ / MSN / AIM / Yahoo / google.com/talk #


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: New snapshot - anywhere in sight?

Michael Beddow-2
I'm especially pleased to see that the fixed text:highlight-matches() and
the new text:kwic-display() functions recently put into CVS are going to be
in the next snapshot. They will let me hand over to eXist a lot of stuff
that I currently do in post-processing. Doing  kwic-reduction in
post-processing currently means I have the latency of returning a lot of
context from the eXist back-end which my middle-tier then throws away.

But the documentation of both functions needs a little expansion and
clarification. Specifically, in neither case is the signature of the
user-defined callback function specified in the docs.

For highlight-matches() we read:

"The function [=highlight-matches()] takes a sequence of text nodes as first
argument $a and a callback function (defined with util:function) as second
parameter $b. $c may contain a sequence of additional values that will be
passed to the callback functions third parameter."

So what are the first two parameters that the callback function also
receives?   The corresponding place in the documentation of kwic-display()
is similarly unclear (the requirements for both callbacks are presumably
identical).

Contrast the (older) documentation of index-terms() which shows the kind of
info that's missing above:

"It can be an arbitrary user-defined function, but it should take exactly 2
arguments: 1) the current term as found in the index as xs:string, 2) a
sequence containing three int values: a) the overall frequency of the term
within the node set, b) the number of distinct documents in the node set the
term occurs in, c) the current position of the term in the whole list of
terms returned. "

At a different level, I'm a bit uneasy at the name kwic-display(). This
function does two things: it reduces the context of the match to a specified
width on either side; and it allows a user-defined callback to access the
matches and process them as per highlight-matches(). It's the first action
that is kwic-specific and it amounts in effect to the creation of the kwic
context from the original larger match context. So it may substantially (and
intentionally) truncate the results returned from the user's original
XQuery, as well as allowing them to be enhanced by the insertion of
match-markers. The latter may be fairly indicated in the name "display", but
I don't think the former is. Basically, users of this function are likely to
get back substantially less data than their original XQuery specified. That
is, of course, exactly what they want, but I do think that anything which
potentially truncates, rather than supplements, the information returned by
the original XQuery needs to signal in its name that something more drastic
than "display" is involved.

That said, I have to admit I can't come up with an alternative name that I'm
entirely happy with.  kwic-truncate() sounds rather alarming, kwic-reduce()
would probably not mean much to users who aren't familiar with the
terminology of kwic creation (where the operation concerned is oftend termed
"context reduction"); and neither name indicates the additional highlighting
functionality.  Would it be too drastic to rename this function simply to
text:kwic()? Since the function both selects the [c]context and allows
highlighting of the [kw]  keyword, this might be as good a way as any of
indicating what it does.

Michael Beddow




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: New snapshot - anywhere in sight?

Michael Beddow-2
In reply to this post by Sava Jurisic
I just refreshed my CVS tree and noticed that the documentation for the two
functions I referred to now contains a sentence with just the info I asked
for, which must have been there before I asked, though I couldn't see it
when these functions first appeared in CVS. So, sorry for the noise re the
callback.

Michael Beddow



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: New snapshot - anywhere in sight?

Michael Beddow-2
But while we're in this area, what about this, which appears to have popped
up as an additional item:

text:kwic-display($a as text*, $b as xs:positiveInteger, $c as function, $d
as function, $e as item*) node*

Is this just an error, or is there really now an overloaded version that
takes *2* function references in its argument list?  What these two
functions might be isn't stated (the description is identical to the version
with only one function reference in its parameter list)

Michael Beddow



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: New snapshot - anywhere in sight?

wolfgangmm
Hi Michael,

text:kwic-display - like some other functions added to cvs recently -
is still very much work in progress and I'm open for suggestions and
improvements. A simple, working example is attached. It queries the
MODS documents contained in samples/mods.

I wrote the kwic-display function for one of my current projects, an
online edition of Goethe's early works and related materials. The
application is still under construction and instable, but for those
who would like to get an idea of the purpose of text:kwic-display, the
URL of the webapp is:

http://demo.exist-db.org/jgoethe/edition.xql

Unfortunately, the interface is in German only. To make a query,
select one of the main sections on the top by clicking a checkbox,
e.g. "WERKE", switch to query mode by selecting the radio button
labelled "Suchemodus", enter a query term into the left text input,
e.g. "liebe" and push "go". The whole thing just consists of a number
of XQuery scripts which are called asynchronously from Javascript,
plus simple XSL stylesheets for formatting the main text corpus. The
XML sources are in TEI.

> Is this just an error, or is there really now an overloaded version that
> takes *2* function references in its argument list?  What these two
> functions might be isn't stated (the description is identical to the version
> with only one function reference in its parameter list)

The attached example contains some comments to explain the functions.
The first function is the "highlight" function: it will be called for
every matching substring (or sequence of matches) found in a text
node. The callback can return an arbitrary node fragment, which will
be inserted at the location of the original match in the text.

The second function is called after kwic-display has finished and
before returning the result. I use this function to check the sibling
nodes if the matching text node is too short to be displayed to the
user. This could be done in XQuery as well, but using the information
that has already been collected by the kwic-display function is much
more efficient.

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: New snapshot - anywhere in sight?

wolfgangmm
Sorry, forgot the attachement...

kwic.xq (3K) Download Attachment