-
Notifications
You must be signed in to change notification settings - Fork 882
Structure the ingredients of recipes better #2738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structure the ingredients of recipes better #2738
Conversation
|
The basic proposal makes sense to me. Therefore I suggest that the property Having said that, there may be a simpler solution whereby As to submitting the proposal, the definition should ideally be placed in a suitably named .ttl file in the pending section with each new term being identified as Making adjustments to terms defined elsewhere can be a bit of a challenge in this structure. However, I believe here you are only adding to existing term definitions (eg. expanding a rangeIncludes). In which case, as all definitions are eventually merged into a single graph, just defining those extra elements within the pending .ttl file should suffice. Finally, to be an easily understood PR, and hopefully useful addition to the vocabulary, it should be accompanied by some examples. @christianlupus. ping me if you need a bit of explanation on the format of the PR submission |
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
abc0d3e to
7b23dab
Compare
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
|
@RichardWallis I tried to incooperate the comments from you into my changes here. I moved the changes mainly to a Otherwise I went with your suggestion to make the groups a valid type for I also added an additional example to cover the two additional cases. I just used the next free example number ( I am waiting for your comments then I can either correct the PR or mark ready for review. |
|
@christianlupus Definition looks good and thanks for the example Example numbers will be auto allocated at release time. Let's see what others have to say on what you propose. |
|
May I just ask how this PR is going to proceed? No discussion has yet taken place here. So I am just curious about the further steps. |
|
I also miss the grouping and quantity features. I like the PR you proposed. Any news on the process of being merged ? |
|
Any change this is gonna make it into v11? It is not mentioned in #2768 |
|
Thanks for making a detailed design proposal. There are certainly many ways that recipe markup could be improved. As we've tried to emphasise in various places the project tries to stay close to large scale usage of structured data, so this should probably be put aside until we can find commitments or at least interest from new or existing applications that use schema.org Recipe data (as well as a few publishers, ideally). Do we have any progress on that side of things? |
|
(in general we don't jump straight to PRs until there's some consensus from issue discussions to "go for it", otherwise we accumulate code that can go out of date relatively easily.) |
|
IOHO this could become a "Down the Rabbit Hole" experience. For example, here is the BBC food/recipe ontology: https://www.bbc.co.uk/ontologies/fo. Relatively simple, but more complex than used in schema.org. Internally we use a recipe ontology that is ~20x the complexity of the BBC design. The approach we take:
Adding complexity to |
|
So, am I getting your suggestion right @jaygray0919 to define our own ontology and schema (as a private extension)? |
|
That's how we handle it. In simple terms, if a schema |
To me, that sounds like a "fork" of schema.org with your required changes to the definitions. Therefore I said you defined your own schema.
It might be adding a bit of complexity here. However, I have seen many sites use such a notion of grouped ingredients anyway. They just do not put these groups into the JSON+LD as it is not supported.
I am sorry but I do not get my head around your point. Are you talking about JSON+LD or something else? What are My understanding is that a standard should be generated such that all can stick with it. The idea behind a standard is to avoid a distributed and inconsistent usage of different flavors of it. |
|
For your investigation: No "forking" - pure JSON-LD + schema.org After you've studied how to use those |
|
@jaygray0919 I think I am pretty sure, I know what properties and classes are. I was not aware that you abbreviate the corresponding schemata by Apart from that, you seem to describe the general modeling used by schema.org. Above you write form Just to make my point clear: If you have a What is this "Down the Rabbit Hole" experience you fear? The changes are 100% backward compatible. So existing code and pages do not need to be changed. But it generates some flexibility especially as it is formatted on many pages accordingly and would just allow a clean structure of the ingredients. |
|
@christianlupus Sorry i failed to make my point. Try this approach. Use
If you follow this approach, you will use schema.org to define new entailments (new logic). Further, you'll find that you don't need to request modifications to the schema data model - you create your own extensions. Now you might say: but that's a non-standard approach and I am proposing something that should be standardized. My response is: if a harvester like SDTT (or Structured Data Linter) "knows what you are saying" and plays back a confirmatory representation, you've achieved your objective: full semantic communication among semantic processors. |
|
OK, now we are getting closer, as I see. First, let me clarify the main culprit for the whole discussion: You are assuming, I am a producer/supplier of JSON data. I see myself both as a supplier but also as a harvester. The app I mentioned in the very first comment allows importing recipes from sites that provide JSON+LD data. Thus we need to be able to read these and are interested in a standardized way to save these. Otherwise, we will have to do fancy stuff exactly in contrast to the idea of a semantic web, where a machine can understand the content of a page. So it is not sufficient that google/SDTT/RRTT can understand our JSON but we must parse other peoples' JSON files. Nevertheless, I tried to do as you described. We might use this approach for our internal files as well. I ended so far with this file that can be fed directly to SDTT using the raw link of github. As working this out is something completely independent from this PR, I will "outsource" it to another channel and contact @jaygray0919 via mail. |
|
ok |
|
@christianlupus Any reason why the values of If I understand https://schema.org/TypeAndQuantityNode correctly they should be a numbers. |
|
@ffes I am sorry, you are right. They should be numbers. I changed the example accordingly. Thanks for the enhancement. |
|
This pull request is being tagged as Stale due to inactivity. |
|
Would be a shame of this PR would be closed by a bot without a proper review. |
I looked at it, discussed it with the OP, feel that the PR has limitations, and presented an alternative approach. |
|
As I just wrote via email, I had a few pressing things at hand and the discussion @jaygray0919 and I had via mail was not so fruitful as I had hoped. It was quite a pack of work to get done to understand his point. I was not able to get it in a short time. Now, I need to revisit things once more. Nevertheless, I have still doubts about it. As already stated, my intention is to have a standardized way to parse such recipes. For example in nextcloud/cookbook#563, a user wants to import a recipe from a 3rd party page into our app. Normally, we would just parse the JSON+LD that the page is providing and have a logical structure of the recipe (just as the idea behind schema is). As the structuring of the ingredients is not supported by the standard, all data providers (such as in the named example) either fall back to one big list of ingredients (in the example) or do their own thing but this is clearly not unique across all sites. I am pretty sure that the discussion yet I had with @jaygray0919 results in a local (per file/resource) extension of the schema.org standard. As I am arguing from the data consumer's perspective, any such extensions are worthless unless I have the computational power and knowledge to run some heuristics that allow my parser to understand other people's thoughts (the same way as JSON playground or google's structured data parser do it). In fact, this contradicts the basic idea behind schema.org and a semantic web. Apart from that, I do not really know what I can do in order to avoid the bot closing this PR without proper review as formulated by @ffes. Of course, I can rebase to make it mergeable again and use a free example id to make travis happy but this seems more like esthetics and less fundamental if this PR should be merged at all. If that's all it takes, I am happily going to make it conflict-free. |
|
The OP revisits a common thread with schema.org: for any given A publisher can handle this by using schema.org But that process may not help a subscriber/consumer (e.g @christianlupus) who transforms less-structured data into more-structured data. The OP is advocating a variation of https://bioschemas.org/, GoodRelations, and similar groups who negotiate to enhance schema.org. But BioSchema/GoodRelations leverage carefully negotiated, arbitrated specifications from other ontologies - i.e. One possible solution would be to allow pending specifications to be tested (e.g. FDA "field trials"). Pending specifications must be constructed in the same form as schema.org is constructed (an RDF model). Pending specifications must be valid (i.e. properly parsed by SDL or GSDTT if/when it is reincarnated as a new service). Similar to schema.org 'pending extensions', "pending specifications" are published on GitHub or another sandbox. Sample documents, composed (authored) or recomposed (variations of the ole ETL approach - export, transform, load), would be added there. Over time, contributions would reveal patterns and variations. As new For consideration. |
|
I just wrote a mail to @jaygray0919 in order to sort this out as much as possible. I'd rather have this PR finished as it causes me quite some headaches. If anyone has a good idea how to proceed from here and get thing going, please give me a hint. I am a bit lost on this. |
|
See issue #2992. The code in the branch behind this PR needs rebasing against the main branch in the schemaorg repository. This will enable it to pass the CI tests which it currently fails. |
As @christianlupus wrote in February already, the question would be whether making CI happy is all that would be required to have this PR merged. Because if not, then the rest that prevents it needs to be discussed anyway and possibly further changes to the PR need to be made.
|
|
As I mentioned earlier it is premature to jump straight to a PR of this complexity without any evidence that parties intend to actually consume this new data structure for significant user-facing services. Having said that, these are sensible issues being raised. If #882 and #2628 don't cover everything it would be good to have those raised, but as an ISSUE not a PULL REQUEST. @christianlupus - thank you for pursuing this. The issue is not being closed by a bot, but by me, on the basis that it is premature to line up these changes to merge into the site before the consensus has been built to use the new structures. Leaving the PR open creates a situation in which versions drift etc will generate busywork for the PR proposer to maintain the proposal, and that seems a poor use of your time. |
The Recipe currently only supports unstructured text for the list of ingredients. This is unfavorable for multiple reasons:
This PR tries to accomplish this in a backward-compatible manner. It is related to #882 and #2628 and possibly other issues.
In fact, the motivation to file this PR is this feature request (and similar/duplicate ones not linked here). The nextcloud cookbook app is an extension to the nextcloud server that allows to store recipes on the server to create personal, digital collections of recipes. One of the main development principles is to stick with the schema.org standard to save the recipes within the server. That way, the export/import into other applications should be kept maximally compatible. Acceptance of this PR will allow us to use the new functions while other applications can take their time for implementing this extension properly.
As this is my first contribution to schemaorg, I hope this suits your process. I was unaware how to overwrite the existing
recipeIngredientproperty from within adata/ext/pending/*.ttlfile. Thus, I changed directly on theschema.ttl. If there is a better way to get things done, please tell me. I will try to be conform to your requirements.