buda-base / lds-pdi

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

rootSearchGraph returning wrong number of results in metadata #172

Closed berger-n closed 4 years ago

berger-n commented 4 years ago

in http://purl.bdrc.io/lib/rootSearchGraph?LG_NAME=zh-hant&I_LIM=500&L_NAME=%22%E7%84%A1%E7%95%8F%E7%AC%88%E5%A4%9A%22&format=json there is only one person returned but metadata say there are 2 of them

MarcAgate commented 4 years ago

The full result of the request is:

dila:A015944  a             bdo:Person ;
        tmp:matchScore      "24.503798"^^xsd:float ;
        tmp:prefLabelMatch  "↦無畏笈多↤"@zh-hant ;
        bdr:P4004           "'jigs med 'byung gnas sbas pa/"@bo-x-ewts ;
        dila:A015944        "Abhayākaragupta"@sa-x-iast , "無畏笈多"@zh-hant , "अभयाकरगुप्त"@und-Zyyy ;
        owl:sameAs          dila:A015944 , bdr:P4004 ;
        skos:prefLabel      "'jigs med 'byung gnas sbas pa/"@bo-x-ewts , "Abhayākaragupta"@sa-x-iast , "無畏笈多"@zh-hant , "अभयाकरगुप्त"@und-Zyyy .

Note that the sole person resource that is seen in the json result has this weird form:

dila:A015944  a             bdo:Person ;
        tmp:matchScore      "24.503796"^^xsd:float ;
        tmp:prefLabelMatch  "↦無畏笈多↤"@zh-hant ;
        bdr:P4004           "'jigs med 'byung gnas sbas pa/"@bo-x-ewts ;
        dila:A015944        "Abhayākaragupta"@sa-x-iast , "無畏笈多"@zh-hant , "अभयाकरगुप्त"@und-Zyyy ;
        owl:sameAs          dila:A015944 , bdr:P4004 ;
        skos:prefLabel      "'jigs med 'byung gnas sbas pa/"@bo-x-ewts , "Abhayākaragupta"@sa-x-iast , "無畏笈多"@zh-hant , "अभयाकरगुप्त"@und-Zyyy .

that translates in the json as :

{
xml:lang: "sa-x-iast",
type: "http://purl.dila.edu.tw/resource/A015944",
value: "Abhayākaragupta"
},
{
xml:lang: "zh-hant",
type: "http://purl.dila.edu.tw/resource/A015944",
value: "無畏笈多"
},
{
xml:lang: "und-Zyyy",
type: "http://purl.dila.edu.tw/resource/A015944",
value: "अभयाकरगुप्त"
},

where the predicate is the URI of the resource, not teh URI of a property of it.

This probably affects the parsing of the results.

Moreover, the presence of triplets such as:

dila:A015944 dila:A015944 "Abhayākaragupta"@sa-x-iast , "無畏笈多"@zh-hant , "अभयाकरगुप्त"@und-Zyyy ; indicates some issue with sparql query design.

WDYT ?

berger-n commented 4 years ago

as we just skyped about it,

{
  xml:lang: "sa-x-iast",
  type: "http://purl.dila.edu.tw/resource/A015944",
  value: "Abhayākaragupta"
}

is a way I have found to be able to make pairs among returned subvalues for a given search result see http://library.bdrc.io/search?q=%22bodhicary%C4%81vat%C4%81ra%22&lg=sa-x-iast&t=Any it allows us to display titles of hasExpression works instead of their ID as it used to: image

MarcAgate commented 4 years ago

Fixed as of commit 097e518 .

berger-n commented 4 years ago

thanks!