Re: Machine-readable cardinalities

I've released a tool that extracts cardinality of Schema.org's properties.
It is available on GitHub: https://github.com/dunglas/php-schema.org-model
The result file containing extracted cardinalities is attached.

The tool extract the cardinality from Good Relations if available or try to
guess it using some regular expressions (
https://github.com/dunglas/php-schema.org-model/blob/master/src/SchemaOrgModel/CardinalityExtractor.php#L101
).

Schema.org has a total of 710 properties. The tool is able to extract
cardinality for 613 of them. For 197, the tool is not able to guess the
cardinality: the cardinality must be edited manually or the extractor must
be enhanced to support most sentences.

 If there is any plan to add the cardinality to properties in a
machine-readable format (like in Good Relations), we can complete and
double-check the generated cardinality.json file and automatically update
the labels of all properties in the HTML+RDFa file to add the cardinality.


2014-01-25 Kévin Dunglas <dunglas@gmail.com>:

> Hi,
>
> I'm writing a code generator that converts Schema.org's types to PHP
> classes.
>
> I'm looking for a machine-friendly way to extract cardinalities of
> properties.
>
> Actually I've started to parse rdf:comment with regex but this is not
> practical. Does someone has a better idea?
>
> A notation such as the one used in Good Relations would be pleasant:
> http://www.heppnetz.de/ontologies/goodrelations/v1.html#microdata_specification(see 10).
>
> Thanks.
>
>
>
> --
> Kévin Dunglas
>
> http://dunglas.fr
>



-- 
Kévin Dunglas
Consultant et développeur freelance

http://dunglas.fr
Tél. : 06 60 91 20 20

Received on Saturday, 1 February 2014 09:55:56 UTC