Is there a way to use spans.correct with patterns?

hi @risvil!

Thanks for your question and welcome to the Prodigy community :wave:

It may be helpful to know why patterns with non-manual recipes can be challenging:

But if you wanted to, you can create a custom recipe. My recommendation would be to start with the spans.manual to view how the patterns file is used and then combine it with the spans.correct.

To view the recipes, run

python -m prodigy stats

And find your Location path (see Location: path/to/python/site-packages/prodigy). Then open that folder and look for the /recipes/spans.py file. If you're able to get something, feel free to post a solution! We're always grateful for custom recipes.

Another option may be to use an entity ruler along with a span or ner model. This post has a good example:

Also, you may find this post helpful too:

I hope this helps get you started and let us know if you have questions!