Describe the reason for these changes and the problem that they solve
When parsing recipe directions, we include inline markup that indicates entities (like kitchen equipment) that have been discovered during parsing.
These entities may be in singular or plural form. For search indexing purposes, we generally want to consolidate the representation of items into a single searchable token for each entity - either the plural form, or the singular form.
For ingredients we dynamically select the singular/plural form based on the most popular representation of the ingredient name in web content that we know about. For equipment, the situation is slightly different since we manually curate a list of equipment names.
This change adds an entities field to the direction parsing response that includes the manually-curated equipment name, so that search indexing can use this as a single token that corresponds to each known equipment item.
Briefly summarize the changes
Add an entities response field on the direction endpoint
Represent each entity in the response field by using a dictionary containing some key properties of the entity
How have the changes been tested?
Local development testing
Some unit test coverage is provided
List any issues that this change relates to
Relates to #62.
Describe the reason for these changes and the problem that they solve
When parsing recipe directions, we include inline markup that indicates entities (like kitchen equipment) that have been discovered during parsing.
These entities may be in singular or plural form. For search indexing purposes, we generally want to consolidate the representation of items into a single searchable token for each entity - either the plural form, or the singular form.
For ingredients we dynamically select the singular/plural form based on the most popular representation of the ingredient name in web content that we know about. For equipment, the situation is slightly different since we manually curate a list of equipment names.
This change adds an
entities
field to the direction parsing response that includes the manually-curated equipment name, so that search indexing can use this as a single token that corresponds to each known equipment item.Briefly summarize the changes
entities
response field on the direction endpointHow have the changes been tested?
List any issues that this change relates to Relates to #62.