def get_entity_occurrences(self):
        eos = getattr(self, '_hydrated_eos', None)
        if eos is None:
            eos = [eo.hydrate_for_segment(self) for eo in
                   self.entity_occurrences.all().order_by('offset')]
            self._hydrated_eos = eos
        return eos
Returns an iterable of EntityOccurrences, sorted by offset
dataset/ETHPy150Open machinalis/iepy/iepy/data/models.py/TextSegment.get_entity_occurrences