Search Postgresql Archives

Searching for appropriate pivots for my Fixed Query Array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to build my database with a metric index. I am using a Fixed Query Array.
I have got a table with many sentences of natural languages. I'm using the Dice Coefficient for calculating the metric space.
I am going to take a certain number of sentences and use them as pivots by calculating their distance to all of my sentences.

The table of distances looks like this:

id INTEGER, pivot TEXT, distance1 REAL, distance2 REAL, distance3 REAL, ...  Eine Query sieht so aus:


A query looks like this:

SELECT id FROM distance 
WHERE dice('sentence', 'pivot1') BETWEEN (distance1 - radius) AND (distance1 + radius) 
  AND dice('sentence', 'pivot2') BETWEEN (distance2 - radius) AND (distance2 + radius) 
  AND dice('sentence', 'pivot3') BETWEEN (distance3 - radius) AND (distance3 + radius) 
  ...


My issue is to find appropriate pivots now.
I cannot take all existing words, that would be too much.

Does any of you have an idea?

TX very much for any support!

Janek


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux