# How do MedCatTrainer annotations refer to spans of text?

**URL:** <https://discourse.cogstack.org/t/how-do-medcattrainer-annotations-refer-to-spans-of-text/109>\
**Category:** MedCAT\
**Created:** [November 15, 2022, 10:15pm UTC](https://discourse.cogstack.org/t/how-do-medcattrainer-annotations-refer-to-spans-of-text/109 "2022-11-15T22:15:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlewi](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jlewi](https://discourse.cogstack.org/u/jlewi)\
**Post date:** [November 15, 2022, 10:15pm UTC](https://discourse.cogstack.org/t/how-do-medcattrainer-annotations-refer-to-spans-of-text/109/1 "2022-11-15T22:15:37Z")

</div>

How do MedCatTrainer annotations keep track of the text span they refer to? Is the text linearized and then each annotation refers to the start and end index(es) of the span(s) supporting that annotation?

---

<div class="post-metadata">

**Author:** ![anthony.shek](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anthony.shek](https://discourse.cogstack.org/u/anthony.shek)\
**Post date:** [November 17, 2022, 4:41pm UTC](https://discourse.cogstack.org/t/how-do-medcattrainer-annotations-refer-to-spans-of-text/109/2 "2022-11-17T16:41:05Z")

</div>

Yes that is correct.

An annotation would appear something like this:

 ![Screenshot 2022-11-17 at 16.38.40](https://europe1.discourse-cdn.com/flex017/uploads/cogstack/original/1X/a528dd5b9a63121817886fb4e4be582c52f1ac16.jpeg)

The meta-annotation (“meta\_anns”) tasks and values are completely customisable so it will appear according to whatever you have configured it to be.
