gpt4 book ai didi

syntax - RDF Turtle 语法 - 如何减少代码重复?

转载 作者:行者123 更新时间:2023-12-02 04:46:26 27 4
gpt4 key购买 nike

我有以下有效的 Turtle 语法:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix sc: <http://education.data.gov.uk/def/school/School#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos>.

<http://example.com/schools/#1000> a <http://education.data.gov.uk/def/school/School> .
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/establishmentName> "Atherstone Early Years Centre".
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/establishmentNumber> "1000".
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/Address> [<http://education.data.gov.uk/def/school/address1> "RATCLIFFE ROAD"; <http://education.data.gov.uk/def/school/postcode> "CV9 1LF"].
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/establishmentType> "Nursery".
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/districtAdministrative> "North Warwickshire".
<http://example.com/schools/#1000> <http://education.data.gov.uk/def/school/uniqueReferenceNumber> "2016".
<http://example.com/schools/#1000> geo:lat "52.5786677".
<http://example.com/schools/#1000> geo:long "-1.5420408".

我基本上用 id#1000 定义一个学校对象然后我为其添加属性。我想知道我是否可以摆脱 <http://example.com/schools/#1000>在每个属性之前定义,并以某种方式用括号或其他东西将属性括起来。有什么想法吗?

最佳答案

分号:

<http://example.com/schools/#1000>
a <http://education.data.gov.uk/def/school/School> ;
<http://education.data.gov.uk/def/school/establishmentName> "Atherstone Early Years Centre" ;
...
<http://example.com/schools/#1000> geo:long "-1.5420408" .

关于syntax - RDF Turtle 语法 - 如何减少代码重复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22199161/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com