What I want to get is the labels including alt labels. Some of the strings has comma, which is used as a delimeter as well, So I'd like to find out how to get all the individual items properly.
SELECT DISTINCT ?e ?eLabel ?eAltLabel ?eDescription
WHERE {
{ ?e rdfs:label "Apple"@en }
UNION
{ ?e skos:altLabel "Apple"@en }
SERVICE wikibase:label { bd:serviceParam wikibase:language "ko,en". }.
}
The first result of the query is Apple (computer), and shows us eAltLabel like below.
Apple, Apple Computer, Apple Computer Inc, Apple Computer, Inc.
After getting the result, I split this string using , as a delimeter.
Apple
Apple Computer
Apple Computer Inc
Apple Computer
Inc.
which is different from what I expected. This is because I consider ,
on the right after Apple computer
as delimeter. I want to get the last one like Apple Computer, Inc.
, the full phrase.
How can I disambiguate each label respectively when the labels entail ,
inside? How can I change the sparql?