# Using ner.manual with predict

**URL:** https://support.prodi.gy/t/using-ner-manual-with-predict/244
**Category:** Uncategorized
**Tags:** usage, done, ner
**Created:** [January 23, 2018, 5:16pm UTC](https://support.prodi.gy/t/using-ner-manual-with-predict/244 "2018-01-23T17:16:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RectoO](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@RectoO](https://support.prodi.gy/u/RectoO)
#### Post date: [January 23, 2018, 5:16pm UTC](https://support.prodi.gy/t/using-ner-manual-with-predict/244/1 "2018-01-23T17:16:15Z")

</div>

I’m currently trying to adapt a NER from Spacy to a specific domain and i’d like to use the ner.manual viewId in order to annotate my documents. But I’d like to have the model prediction in this view, i tried to create my own recipe with predict(stream) but the view doesn’t support this kind of data i guess.

I tried to look at how i could edit this view id (ner.manual) but couldn’t find this information.

Here is my recipe tryout:

```python
@recipe('ner.annotate',
        dataset=recipe_args['dataset'],
        spacy_model=recipe_args['spacy_model'],
        source=recipe_args['source'],
        label=recipe_args['entity_label'])
def annotate(dataset, spacy_model, source, label=[]):
    stream = get_stream(source, rehash=True, dedup=True, input_key='text')
    # Create the model, using a pre-trained spaCy model.
    nlp = spacy.load(spacy_model)
    labels = get_labels(label, nlp)
    model = EntityRecognizer(nlp, label=label)
    predict = model
    update = model.update
    # Split the stream into sentences
    stream = split_sentences(nlp, stream)
    # Return components, to construct Controller
    return {
        'view_id': 'ner.manual',
        'dataset': dataset,
        'stream': predict(stream),
        'update': update, # callback to update the model in-place
        'config': {'lang': model.nlp.lang,
                   'labels': labels}
    }

```

Thanks in advance for your help !

---

<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 23, 2018, 5:36pm UTC](https://support.prodi.gy/t/using-ner-manual-with-predict/244/2 "2018-01-23T17:36:04Z")

</div>

Looks like there’s a small typo in your `view_id` – it’s `ner_manual`, not `ner.manual` (which is the name of the recipe).

Also, just so you know, the manual NER interface currently doesn’t support pre-defined spans and will only let you annotate from scratch. This means that your recipe will work and show examples from the scored stream, but it’ll reset all `"spans"` in the interface.

Correcting pre-defined spans in the manual NER interface will be coming to Prodigy in the next version, as a new and improved `ner.make-gold` recipe. See [my comments on this thread](https://support.prodi.gy/t/demo-fully-manual-ner-annotation-interface/174/42?u=ines) for more details.
