# Using Prodigy to confirm or reject existing document labels

**URL:** <https://support.prodi.gy/t/using-prodigy-to-confirm-or-reject-existing-document-labels/1105>\
**Category:** Uncategorized\
**Tags:** usage, textcat, solved\
**Created:** [January 5, 2019, 11:29am UTC](https://support.prodi.gy/t/using-prodigy-to-confirm-or-reject-existing-document-labels/1105 "2019-01-05T11:29:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nuno](https://avatars.discourse-cdn.com/v4/letter/n/65b543/32.png) [@nuno](https://support.prodi.gy/u/nuno)\
**Post date:** [January 5, 2019, 11:29am UTC](https://support.prodi.gy/t/using-prodigy-to-confirm-or-reject-existing-document-labels/1105/1 "2019-01-05T11:29:38Z")

</div>

Hi!

Working with text classification, I have a list of documents which already have been assigned a label outside of Prodigy. However, some of these documents have been wrongly labeled or I simply don’t want to include them in training a text classification model.

I thought I could use Prodigy to confirm or reject documents and respective label. I want to use textcat teach interface to accept/reject document-labels pairs but I want Prodigy to suggest exactly the label which has already been assigned previously.

Is there a way to do this with Prodigy?

Thanks.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [January 5, 2019, 11:46am UTC](https://support.prodi.gy/t/using-prodigy-to-confirm-or-reject-existing-document-labels/1105/2 "2019-01-05T11:46:43Z")

</div>

Yes, that should be pretty straightforward! Let’s assume your input data looks something like this:

```json
{"text": "This is a text", "label": "LABEL_ONE"}
{"text": "This is another text", "label": "LABEL_TWO"}

```

This is how Prodigy usually represents texts with a label, and the format should hopefully be very easy to generate from whichever format you already have.

You can then load the data into Prodigy and annotate it. The `mark` recipe takes the exact data it receives, renders it in a given interface and presents it to you so you can accept/reject it. So basically, exactly what you want to do. Here’s an example:

```bash
prodigy mark your_dataset your_data.jsonl --view-id classification

```

You can then run `db-out` to export your dataset, and each example will have an `"answer"` key with either `"accept"`, `"reject"` or `"ignore"`. You can then use that information to filter the examples so you only have the accepted ones, double-check the rejected answers or do whatever else you need.

Here’s the simplified and annotated source of the `mark` recipe btw so you can see what’s happening under the hood when you run it:

> <https://github.com/explosion/prodigy-recipes/blob/master/other/mark.py>

---

<div class="post-metadata">

**Author:** ![nuno](https://avatars.discourse-cdn.com/v4/letter/n/65b543/32.png) [@nuno](https://support.prodi.gy/u/nuno)\
**Post date:** [January 5, 2019, 12:31pm UTC](https://support.prodi.gy/t/using-prodigy-to-confirm-or-reject-existing-document-labels/1105/3 "2019-01-05T12:31:06Z")

</div>

This was exactly what I needed. Thanks for the very fast reply! You’re providing awesome support always!
