获取特定类别下的所有Schema.org模式(Place,LocalBusiness) [英] Get all Schema.org schemas under a specific category (Place, LocalBusiness)

查看:182
本文介绍了获取特定类别下的所有Schema.org模式(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感兴趣,请快照可用



作为快速概述:





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:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆