如何顯示數據的屬性標籤? 我爲dbpedia本體工作,
我想做一個sparql查詢,下面是我的示例查詢。這個結果混合了數據類型或對象類型,我想要數據類型屬性名稱。如何使sparql查詢只關於數據類型名稱?
SELECT ?p ?pLabel ?domain ?range { ?p rdfs:domain http://dbpedia.org/ontology/Person> . }
例如:以下是數據類型的例子,但我不能只選擇數據類型,我想顯示 類型名稱。
"chat"
'chat'@fr with language tag "fr"
"xyz"^^<http://example.org/ns/userDatatype>
"abc"^^appNS:appDataType
'''The librarian said, "Perhaps you would enjoy 'War and Peace'."'''
1, which is the same as "1"^^xsd:integer
1.3, which is the same as "1.3"^^xsd:decimal
1.300, which is the same as "1.300"^^xsd:decimal
1.0e6, which is the same as "1.0e6"^^xsd:double
true, which is the same as "true"^^xsd:boolean
false, which is the same as "false"^^xsd:boolean
expect to result
希望得到(唯一的數據類型)
typename <- field name
string <- type name
int
boolean
int
double
boolean
如何使一個SPARQL查詢?
謝謝你的回答,我確定datatype()函數是正確的,但是......我的問題是...... ex:http://www.w3.org/2001/XMLSchema#gYea - > String(Result !as Literal TYPE)如何做出結果〜? ;;; -_- ;;; –
幾次閱讀您的問題和評論後,我認爲您的意思是您希望返回數據類型的_label_而不是其/ URI旁邊的/。那是對的嗎? –