# Displaying a confidence score next to a user-defined entity

**URL:** <https://support.prodi.gy/t/displaying-a-confidence-score-next-to-a-user-defined-entity/403>\
**Category:** Uncategorized\
**Tags:** usage, ner\
**Created:** [March 14, 2018, 5:07pm UTC](https://support.prodi.gy/t/displaying-a-confidence-score-next-to-a-user-defined-entity/403 "2018-03-14T17:07:23Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![honnibal](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/honnibal/32/35_2.png) [@honnibal](https://support.prodi.gy/u/honnibal)\
**Post date:** [March 14, 2018, 7:38pm UTC](https://support.prodi.gy/t/displaying-a-confidence-score-next-to-a-user-defined-entity/403/7 "2018-03-14T19:38:01Z")

</div>

Hmm. Actually that code looks weird. Try this:

```python
text = content
doc = nlp.make_doc(text)
(beams, somethingelse) = nlp.entity.beam_parse([doc], beam_width=16, beam_density=0.0001)
for score, ents in nlp.entity.moves.get_beam_parses(beams[0]):
    print (score, ents)
    entity_scores = defaultdict(float)
    for start, end, label in ents:
        # print ("here")
        entity_scores[(start, end, label)] += score
        print ('entity_scores', entity_scores)

```

---

_[View the full topic](https://support.prodi.gy/t/displaying-a-confidence-score-next-to-a-user-defined-entity/403)._
