Describe the reason for these changes and the problem that they solve
It would be a significant user experience improvement if the application is able to render complete ingredient description strings, instead of simply rendering the ingredient name.
Multiple steps are required before we can reach a situation where the original wording can be displayed in full, with ingredient names interpolated into the display. XML tends to be a useful format when interpolating of machine-readable and human-readable text data.
This changeset implements the first step, adding a markup field to knowledge-graph responses for ingredient parsing requests.
Since the input and output relate purely to ingredients, and should not contain quantities or other metadata, each match is enclosed within a pair of mark XML tags. Other upstream services may transform this into other representations.
Briefly summarize the changes
During response generation, scan the input description for the best-matching ingredient's search terms
Markup the relevant text and include it in the query response
Describe the reason for these changes and the problem that they solve
It would be a significant user experience improvement if the application is able to render complete ingredient description strings, instead of simply rendering the ingredient name.
User feedback has highlighted this as an issue, as recorded in https://github.com/openculinary/frontend/issues/103.
Multiple steps are required before we can reach a situation where the original wording can be displayed in full, with ingredient names interpolated into the display. XML tends to be a useful format when interpolating of machine-readable and human-readable text data.
This changeset implements the first step, adding a
markup
field toknowledge-graph
responses for ingredient parsing requests.Since the input and output relate purely to ingredients, and should not contain quantities or other metadata, each match is enclosed within a pair of
mark
XML tags. Other upstream services may transform this into other representations.Briefly summarize the changes
description
for the best-matching ingredient's search termsHow have the changes been tested?
List any issues that this change relates to Relates to https://github.com/openculinary/frontend/issues/103