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

Direction parsing: tag verbs in preparation text #47

Closed jayaddison closed 4 years ago

jayaddison commented 4 years ago

Describe the reason for these changes and the problem that they solve

By highlighting and surfacing the verbs contained in recipe direction text we can prepare to present user-facing assistance during meal preparation.

Briefly summarize the changes

  1. Add the spacy library as a system-level dependency
  2. Download the en_core_web_sm spacy language model to the application, selected based on minimal size impact on the container image (other, more accurate models are available albeit with a larger size as a tradeoff)
  3. Load the NLP model at application start-time
  4. Tag verbs in direction text and include these tags in the API response markup field

How have the changes been tested?

  1. Local development testing
  2. Unit test coverage is provided