buda-base / lds-pdi

http://purl.bdrc.io BDRC Linked Data Server
Apache License 2.0
2 stars 0 forks source link

Topic tree in associated resources search #68

Closed berger-n closed 5 years ago

berger-n commented 6 years ago

it would be useful to return the topic tree in associated resources search too, eg http://buda1.bdrc.io:13280/lib/workAllAssociations?R_RES=bdr:W22003

MarcAgate commented 6 years ago

Implemented as of commit bdc93bb

berger-n commented 6 years ago

perfect ! thanks

there is a small problem though, inside the tree itself, in the above example http://buda1.bdrc.io:13280/lib/workAllAssociations?R_RES=bdr:W22003 it tells that among 200 works we have 315 works in Buddhist Study / bdr:O9TAXTBRC201605_0060 ...

also, would it be possible to add it in personAllAssociations too ? http://buda1.bdrc.io:13280/lib/personAllAssociations?I_LIM=500&R_RES=bdr:P6161 (and maybe in others xyzAllAssociations that can return Works)

MarcAgate commented 6 years ago

It doesn't tell we have 315 works in buddhist study: it tells that among 200 works, we have found 315 occurences of topics belonging to bdr:O9TAXTBRC201605_0060 (Many works have several associated topics)

eroux commented 6 years ago

Well, then I think the computation method should be changed to conform what users would expect

eroux commented 6 years ago

You could even have a 2 birds / one stone move by tackling #66: when you get your model, infer all the ancestor nodes of each result, then count.

For instance if you have:

bdr:TAX01 :hasTaxSubclass bdr:TAX02 , bdr:TAX03 . 

bdr:W123 :hasTopic bdr:TAX02 .
bdr:W321 :hasTopic bdr:TAX02 , TAX03 .

instead of doing:

COUNT_TAX01 = SUM(OCCUREENCES_OF_TAX02) + SUM(OCCURRENCES_OF_TAX03) = 2+1 = 3

you first run inference and get:

bdr:W123 :hasTopic bdr:TAX02, TAX01 .
bdr:W321 :hasTopic bdr:TAX02 , TAX03 , TAX01 .

then you just count normally:

COUNT_TAX01 = SUM(OCCURENCES_OF_TAX01) = 2
MarcAgate commented 6 years ago

Taxonomy tree facets is now available in all XXXAllAssociations graphs.

MarcAgate commented 5 years ago

I think this one can be closed

berger-n commented 5 years ago

indeed