Use case – food order bot
Consider the following sample sentence: I'm looking for a cheap Chinese place in Indiranagar.
We want to pick out Chinese as a cuisine type in the sentence. We can obviously take simple approaches, like exact substring matching (search Chinese) or TF-IDF-based matches.
Instead, we will generalize the model to discover cuisine types that we might not have identified yet, but that can learn about via the GloVe embedding.
We'll keep it as simple as possible: we'll provide some example cuisine types to tell the model that we need cuisines, and look for the most similar words in the sentence.
We'll loop through the words in the sentence and pick out the ones whose similarity to the reference words is above a certain threshold. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access