- From: Roberto Polli <robipolli@gmail.com>
- Date: Tue, 4 Oct 2022 23:05:25 +0200
- To: Gregg Kellogg <gregg@greggkellogg.net>
- Cc: public-json-ld-wg@w3.org
- Message-ID: <CAP9qbHX3RyftK=v7EY0jZp=1bh=v=NeCRW56mc1_4ZhNYeXw6Q@mail.gmail.com>
Hi Gregg, thanks for your reply! I didn't know the playground was able to communicate the frame: cool. The proposed solution shows even further entries that I don't want to show, eg. the @lang: en one. https://tinyurl.com/yjk3dr76 If this is the correct behavior, IIUC the selection algorithm works at the predicate level instead of at the triple level (eg. all of the skos:prefLabel is selected, and not only the triples matching each possible language)... Can you point me to the framing specification algorithm that selects the nodes to show? Thanks++, R. On Tue, 4 Oct 2022 at 22:30, Gregg Kellogg <gregg@greggkellogg.net> wrote: > You’re running afoul some frame selection logic, which ends up selecting > just selects one of the values. What happens is that the frame gets > expanded, and you show two values for the single property “skos:prefLabel”. > You probably want to either have an empty frame, or wild-card > “skos:prefLabel”. > > These things are best communicated using links to the playground, such as > https://tinyurl.com/yfr3bvxe, which uses the following frame: > > { > "@context": { > "label_it": {"@id": "skos:prefLabel","@language": "it" }, > "label_fr": {"@id": "skos:prefLabel","@language": "fr" } > }, > "skos:prefLabel": {} > } > > Gregg Kellogg > gregg@greggkellogg.net > > On Oct 4, 2022, at 10:10 AM, Roberto Polli <robipolli@gmail.com> wrote: > > Dear folks, > > I am struggling with framing. The result is the same with both pyld and > the playground. > > Given a multi-language JSON-LD I want to pick two skos:prefLabels, like > that > > { > "label_it": {"@language": "it", "@value": {}}, > "label_fr": {"@language": "fr", "@value": {}}, > "@context": { > "label_it": {"@id": "skos:prefLabel","@language": "it" }, > "label_fr": {"@id": "skos:prefLabel","@language": "fr" }, > } > } > > Full gist here > - https://gist.github.com/ioggstream/e9c4748208728c5abca34a7c6e309284 > > but the framing mechanism only shows the last field (e.g. label_fr), eg. > > { label_fr: France } # No Italy here! > > Instead, if I don't filter, like below, the framing mechanism dumps all > unmentioned languages in > "skos:prefLabel" field, even if "skos:prefLabel" is not mentioned between > the "@explicit" fields. > > { > "label_it": {}, > "label_fr": {}, > "@context": { > "label_it": {"@id": "skos:prefLabel","@language": "it" }, > "label_fr": {"@id": "skos:prefLabel","@language": "fr" }, > } > } > Is there a standard way to tell "framing" to strip off specific/unwanted > fields like "skos:prefLabel"? > > Thanks ++, > R. > > > >
Received on Tuesday, 4 October 2022 21:05:49 UTC