Hi,
Im also able to generate acceptable JSON-LD but problem is that Fuseki
output, which is correct, doesn't work with Google.
On 17.8.2018 14:03, François-Paul Servant wrote:
Hi,
here a version of the json-ld that seems to work in the testing tool
{
"@context" : {
"schema" : "http://schema.org/"
},
"@graph": [
{
"@id" : "https://resource.lingsoft.fi/d0adc027-56d6-449e-a116-7db6eefd94b0",
"@type" : "schema:Service",
"schema:category" : "Some service",
"schema:provider" : {
"@id" : "https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6"
}
},
{
"@id" : "https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6",
"@type" : "http://schema.org/Organization",
"schema:name" : "Lingsoft, Inc."
}
]
}
I didn’t check whether this would be returned by the jena API (it should). Note
the:
"schema:provider" : {
"@id" : "https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6"
}
instead of
"schema:provider" :
"https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6"
fps
Le 17 août 2018 à 11:47, Mikael Pesonen <mikael.peso...@lingsoft.fi> a écrit :
Still other issues remain. All data has to be inline, no references allowed. For example in the
triple data, "provider" is a reference to another entity. Google sees this as the
provider has a name "https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6"
so don't understand it's a reference.
{
"@id" : "https://resource.lingsoft.fi/d0adc027-56d6-449e-a116-7db6eefd94b0",
"@type" : "http://schema.org/Service",
"category" : "Some service",
"provider" :
"https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6",
"@context" : {
"provider" : {
"@id" : "http://schema.org/provider",
"@type" : "@id"
},
"category" : {
"@id" : "http://schema.org/category"
}
}
}
{
"@id" : "https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6",
"@type" : "http://schema.org/Organization",
"name" : "Lingsoft, Inc.",
"@context" : {
"name" : {
"@id" : "http://schema.org/name"
}
}
}
I wonder if there is an automatic way to make "compacted" or combined version
of several entities.
On 17.8.2018 12:03, Mikael Pesonen wrote:
That was the issue. And if you omit language tags from strings, Fuseki output
will be in correct format for schema.org and Google.
So schema.org's textual parameters don't want to know anything about languages
it seems.
Thanks!
On 17.8.2018 11:18, François-Paul Servant wrote:
Hi,
it looks like schema.org defines the value of the “name” property to be of type
“Text”, and “Text” seems to only allow a simple string as content. As you may
have noticed, if you replace
"name" : {
"@language" : "en",
"@value" : "Lingsoft, Inc."
},
by
“name” : "Lingsoft, Inc.”,
then the structured data testing tool doesn’t complain anymore. I’d be curious
to know what schema.org’s people say about that.
fps
Le 16 août 2018 à 15:07, Mikael Pesonen <mikael.peso...@lingsoft.fi> a écrit :
I'm exporting JSON-LD from Fuseki into web page, but Google's validation
(https://search.google.com/structured-data/testing-tool) doesn't accept it.
Triplets:
<https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6>
a <http://schema.org/Organization> ;
<http://schema.org/name> "Lingsoft, Inc."@en .
JSON-LD snippet in web page:
<script type="application/ld+json">
{
"@id" : "https://resource.lingsoft.fi/13229bdf-99bf-4030-a6e0-6afa8f281dc6",
"@type" : "http://schema.org/Organization",
"name" : {
"@language" : "en",
"@value" : "Lingsoft, Inc."
},
"@context" : {
"name" : {
"@id" : "http://schema.org/name"
}
}
}
</script>
Google's validation says
name is not a known valid target type for the name property
and error is pointing to line containing the first
"name" : {
Anyone got an idea what is wrong and how to fix the data? Sorry if this is not
Fuseki related problem.
--
Lingsoft - 30 years of Leading Language Management
www.lingsoft.fi
Speech Applications - Language Management - Translation - Reader's and Writer's
Tools - Text Tools - E-books and M-books
Mikael Pesonen
System Engineer
e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300
Time zone: GMT+2
Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND
Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND
--
Lingsoft - 30 years of Leading Language Management
www.lingsoft.fi
Speech Applications - Language Management - Translation - Reader's and Writer's
Tools - Text Tools - E-books and M-books
Mikael Pesonen
System Engineer
e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300
Time zone: GMT+2
Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND
Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND
--
Lingsoft - 30 years of Leading Language Management
www.lingsoft.fi
Speech Applications - Language Management - Translation - Reader's and Writer's
Tools - Text Tools - E-books and M-books
Mikael Pesonen
System Engineer
e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300
Time zone: GMT+2
Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND
Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND