# span categorization

**URL:** <https://support.prodi.gy/t/span-categorization/6448>\
**Category:** Uncategorized\
**Tags:** spacy, spancat\
**Created:** [March 23, 2023, 2:38pm UTC](https://support.prodi.gy/t/span-categorization/6448 "2023-03-23T14:38:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kushal\_pythonist](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/kushal_pythonist/32/2986_2.png) [@kushal\_pythonist](https://support.prodi.gy/u/kushal_pythonist)\
**Post date:** [March 23, 2023, 2:38pm UTC](https://support.prodi.gy/t/span-categorization/6448/1 "2023-03-23T14:38:17Z")

</div>

I have a resume data and i want to segment the profile, name, contact, email from the resume. I had perform the spancat annotations from prodigy. and followed the tutorials as in this video

[![](https://img.youtube.com/vi/xgV3Rlj49lQ/maxresdefault.jpg "Introducing Span Categorization in Prodigy and spaCy") ](https://www.youtube.com/watch?v=xgV3Rlj49lQ)

I m confused how to inference the spancat models and what to do next as that is not mentioned in the videos. or can you guide me what to do next ? Yes i have the train.spacy and dev.spacy files.

_NOTE_ : I had a resume data as:

```python
{"text": "Name: helen helen E-Mail: helen.helen@gmail.com Address: Hong Kong, Hong Kong Github: https://github.com/helen LinkedIn: https://linkedin.com/helen Phone No. 192094070156"}

```

This is the data and how i annotate i will mention as : the whole above text is labelled as : `PROFILE`, and othere as the given labels: `PROFILE_NAME,PROFILE_EMAIL,PROFILE_ADDRESS,PROFILE_PHONE`

Is am i doing something wrong here? Please guide me 🙂 Appreciated

---

<div class="post-metadata">

**Author:** ![ryanwesslen](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ryanwesslen/32/2969_2.png) [@ryanwesslen](https://support.prodi.gy/u/ryanwesslen)\
**Post date:** [March 23, 2023, 2:56pm UTC](https://support.prodi.gy/t/span-categorization/6448/2 "2023-03-23T14:56:40Z")

</div>

hi @kushal_pythonist,

> [@kushal\_pythonist](#):
>
> I m confused how to inference the spancat models and what to do next as that is not mentioned in the videos. or can you guide me what to do next ? Yes i have the train.spacy and dev.spacy files.

By inference, do you mean training?

Since you have the spacy binary files, I presume you ran `data-to-spacy` like in the [docs](https://prodi.gy/docs/span-categorization#training-spacy):

```bash
$ prodigy data-to-spacy ./corpus --spancat covid_articles

To use this data for training with spaCy, you can run:
python -m spacy train ./corpus/config.cfg --paths.train ./corpus/train.spacy --paths.dev ./corpus/dev.spacy

```

Like the output states, the next step is to run `spacy train`. Did you do that?

Can you describe what steps are confusing?

---

<div class="post-metadata">

**Author:** ![kushal\_pythonist](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/kushal_pythonist/32/2986_2.png) [@kushal\_pythonist](https://support.prodi.gy/u/kushal_pythonist)\
**Post date:** [March 23, 2023, 4:16pm UTC](https://support.prodi.gy/t/span-categorization/6448/3 "2023-03-23T16:16:34Z")

</div>

> [@ryanwesslen](#):
>
> By inference, do you mean training?

Well i need to check whether the trained spancat model is performing good or bad

> [@ryanwesslen](#):
>
> Since you have the spacy binary files, I presume you ran `data-to-spacy` like in the [docs](https://prodi.gy/docs/span-categorization#training-spacy):

yes

> [@ryanwesslen](#):
>
> Like the output states, the next step is to run `spacy train`. Did you do that?

yes i have done that but i'm confused what to do next and have no any insights to go further. Can you enlighten me .

---

<div class="post-metadata">

**Author:** ![sherpa.codes](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/sherpa.codes/32/3697_2.png) [@sherpa.codes](https://support.prodi.gy/u/sherpa.codes)\
**Post date:** [March 24, 2023, 10:33am UTC](https://support.prodi.gy/t/span-categorization/6448/4 "2023-03-24T10:33:52Z")

</div>

> [@ryanwesslen](#):
>
> ```python
> $ prodigy data-to-spacy ./corpus --spancat covid_articles
> 
> To use this data for training with spaCy, you can run:
> python -m spacy train ./corpus/config.cfg --paths.train ./corpus/train.spacy --paths.dev ./corpus/dev.spacy
> 
> ```

I have trained the model using this command. And got stuck and confused  
what to do next. Can @kushal_pythonist and @ryanwesslen help me through this and provide guidance. ATM I'm I m null about proceeding further. Thanks 🙂
