Re: [basex-talk] How to apply array:for-each on an array of arrays?

2020-03-30 Thread Graydon
On Mon, Mar 30, 2020 at 11:16:23PM +0200, Ben Engbers scripsit: [snip] > For "probleem", the idf should be calculated as ln($count/703). Since > there are 1780 nodes this would result in 0.929011751. > I tried to exten the 'let $idf' line with: >=> array:for-each(function($idf)

Re: [basex-talk] How to apply array:for-each on an array of arrays?

2020-03-30 Thread Bridger Dyson-Smith
Hi Ben - I'm on mobile, please excuse any typos. Maybe `return array { $idf }` is closer? Untested, apologies! Best, Bridger On Mon, Mar 30, 2020, 5:16 PM Ben Engbers wrote: > Hi, > > In textmining, the 'idf' or inverse document frequency is defined as > idf(term)=ln(ndocuments / ndocuments

[basex-talk] How to apply array:for-each on an array of arrays?

2020-03-30 Thread Ben Engbers
Hi, In textmining, the 'idf' or inverse document frequency is defined as idf(term)=ln(ndocuments / ndocuments containing term). I am working on a function that should return this idf. This function: declare function local:wordFreq_idf($nodes as node()*) as array(*) { let $count :=

Re: [basex-talk] Memoize

2020-03-30 Thread Liam R. E. Quin
On Mon, 2020-03-30 at 15:39 +0200, Christian Grün wrote: > I remember that some users have successfully utilized Memcached in > the past to cache BaseX query results. I did this for a while on fromoldbooks.org and it worked fine (you have to know when to invalidate the cache of course!). But

Re: [basex-talk] collection('/test-db-1/bib')//Q{}libro versus collection('/test-db-1/bib')//libro

2020-03-30 Thread Christian Grün
Hi Martin, Thanks for the analysis. As you’ve already indicated, the combination of documents with and without namespaces triggered an optimization that should only take effect if all documents of a database have the same default namespace The bug has been fixed; a new snapshot is online [1,2].

Re: [basex-talk] serialize with SerialMethod.XML

2020-03-30 Thread jfrm.mau...@gmail.com
Hi Christian, Le 30/03/2020 à 15:51, Christian Grün a écrit : You should always close instances of classes that inherit the Closeable interface. Thank you for the tip. I will change my code. Regards. -- Jean-François MAUREL PIMECA http://www.pimeca.com

Re: [basex-talk] Memoize

2020-03-30 Thread Christian Grün
Hi Mickael, BaseX provides no dedicated memoization features. I remember that some users have successfully utilized Memcached in the past to cache BaseX query results. Salutations, Christian On Mon, Mar 23, 2020 at 11:05 AM Mickael Desfrenes wrote: > > Hello dear basex list, > > Is there any

Re: [basex-talk] collection('/test-db-1/bib')//Q{}libro versus collection('/test-db-1/bib')//libro

2020-03-30 Thread Martin Honnen
Am 29.03.2020 um 16:26 schrieb Martin Honnen: Using BaseX 9.3.2, why does a query   collection('/test-db-1/bib')//Q{}libro return 6 items while   collection('/test-db-1/bib')//libro gives 0 items? If I run collection('/test-db-1/bib')//Q{}libro, collection('/test-db-1/bib')//libro the