how to add weightage to spacy spans?

36 views Asked by At

Let's say I'm adding specific food product separated by commas.

Eg : The ingredients in tomato soup is tomatoes, salt, pepper. You need to heat the tomatoes till it smells like burnt apples.

Now by previous training it can detect 4 ingredients :

  1. tomato
  2. salt
  3. pepper
  4. apple.

Apple is the wrong span detected here.

But burnt apples is not an ingredient in the dish, it is just a random reference. SO how can I stop or reduce weight-age based on phrases or way the sentence is framed?

Also, I'm using spans (spancat). I've not used spangroup and acutally I don't know if spangroup will fix this issue.

Please let me know how I can add weightage for specific pattern or phrase in spans.

0

There are 0 answers