获取特定类别下的所有Schema.org模式(Place,LocalBusiness) [英] Get all Schema.org schemas under a specific category (Place, LocalBusiness)
问题描述
我想知道是否有网站或方法来获取特定类别下所有Schema.org模式的列表(例如: Place
)。 / p>
我在Schema.org上找到了完整列表 - 他们还提供了一个JSON-LD文件 - 但是没有办法轻松地过滤/排序这个 。
我的目标是获得所有这些地方的列表(PHP,JSON,无论如何)。
大多数词汇/本体是使用 RDF 。
词汇表.org也不例外。 HTML + RDFa中提供了 Schema.org的规范/机器可读表示
http://schema.org/docs/schema_org_rdfa.html
此文件始终包含当前版本。如果您对特定版本的Schema.org感兴趣,请快照可用。
作为快速概述:
-
每个Schema.org 类型是类型为
rdfs:Class
。
- 子类型用
rdfs:subClassOf
属性
- 子类型用
-
每个Schema.org 属性的类型为
rdf:Property
。
-
子属性指定为
rdfs:subPropertyOf
属性。 -
通过 <$ c $指定属性(即,预期属性的类型)的域 c> schema:domainIncludes 属性。
-
属性的范围 ,预期的值)通过
schema:rangeIncludes
属性。
-
RDFa是一个RDF序列化, RDF解析器支持(如果不是,自动将其转换为其他RDF序列化,如Turtle,RDF / XML或JSON-LD)很简单。为此可以使用许多不同的工具和库。 (您应该使用RDF感知工具,而不是尝试以HTML格式解析该文件。)
I'm wondering if there is a website or a way to get the list of all the Schema.org schemas under a specific category (ex: Place
).
I found the complete list on Schema.org - they also provide a JSON-LD file - but there's no way to filter/order this easily.
My goal is to get the list of all the places in a nice array (PHP, JSON, whatever).
Most vocabularies/ontologies are defined using RDF.
The vocabulary Schema.org is no exception. The canonical/machine-readable representation of Schema.org is provided in HTML+RDFa:
http://schema.org/docs/schema_org_rdfa.html
This file always contains the current release. If you are interested in specific versions of Schema.org, snapshots are available.
As a quick overview:
Each Schema.org type is of type
rdfs:Class
.- Sub-types are specified with the
rdfs:subClassOf
property.
- Sub-types are specified with the
Each Schema.org property is of type
rdf:Property
.Sub-properties are specified with the
rdfs:subPropertyOf
property.The domains of a property (i.e., on which types this property is expected) are specified with the
schema:domainIncludes
property.The ranges of a property (i.e., which values are expected) are specified with the
schema:rangeIncludes
property.
RDFa is a RDF serialization which many RDF parsers support (if not, it’s simple to automatically convert it into other RDF serializations, like Turtle, RDF/XML, or JSON-LD). There are many different tools and libraries available for this purpose. (You should use an RDF-aware tool instead of trying to parse the file as HTML.)
这篇关于获取特定类别下的所有Schema.org模式(Place,LocalBusiness)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!