Prodigy db-out without the flagged data

Hello Ines,

I have doing the NER annotation and activating the flagging in the prodigy configuration. How to db-out only the un-flagged data? In this documentation (https://prodi.gy/docs/api-web-app#flagging), it just mention how to db-out the flagged data.

Thank you

Hi!

You can find a similar question and relevant answer in this thread: Exporting not_flagged annotation

In short, there's not a predefined option for this, but it should be straightforward to implement as a custom recipe:

from prodigy.components.db import connect

db = connect()
examples = db.get_dataset("your_dataset")
filtered_examples = [eg for eg in examples if not eg.get("flagged")]

Thank you Sofie :pray:

1 Like