Skip to content

Commit

Permalink
metadata opr index v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhb committed Sep 11, 2023
1 parent 31da185 commit 0dd97fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
13 changes: 5 additions & 8 deletions index_v1.hf
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,8 @@ Note: this operation strictly depends on external services (i.e. doi.org and ass
}
]
#sparql PREFIX cito: <http://purl.org/spar/cito/>
SELECT ?doi (count(?oci) as ?citation_count) (GROUP_CONCAT(?citing; separator="; ") as ?citation) {
VALUES ?doi { [[dois]] }
BIND(IRI(CONCAT("https://w3id.org/oc/meta/br/", ?doi)) as ?val)
OPTIONAL{
?oci cito:hasCitedEntity ?val .
?oci cito:hasCitingEntity ?citing .
}
} GROUP BY ?doi
SELECT ?val (count(?oci) as ?citation_count) (GROUP_CONCAT(?citing; separator="; ") as ?citation) {
VALUES ?val { [[dois]] }
?oci cito:hasCitedEntity ?val .
?oci cito:hasCitingEntity ?citing .
} GROUP BY ?val
5 changes: 4 additions & 1 deletion indexapi_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def split_dois(s):
return "\"%s\"" % "\" \"".join(s.split("__")),

def split_dois2omids(s):
return "\"%s\"" % "\" \"".join([__get_omid_of_doi(d) for d in s.split("__")]),
#return "\"%s\"" % "\" \"".join([__get_omid_of_doi(d) for d in s.split("__")]),
return " ".join(["<https://w3id.org/oc/meta/br/"+str(__get_omid_of_doi(d))+">" for d in s.split("__")]),



def doi2omid(s):
return __get_omid_of_doi(s),
Expand Down

0 comments on commit 0dd97fa

Please sign in to comment.