openculinary / knowledge-graph

The RecipeRadar knowledge graph stores and provides access to recipe and ingredient relationship information.
GNU Affero General Public License v3.0
10 stars 0 forks source link

Recipe direction responses: include equipment items as named entities #63

Closed jayaddison closed 3 years ago

jayaddison commented 3 years ago

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

  1. Add an entities response field on the direction endpoint
  2. Represent each entity in the response field by using a dictionary containing some key properties of the entity

How have the changes been tested?

  1. Local development testing
  2. Some unit test coverage is provided

List any issues that this change relates to Relates to #62.