Add missing loop for match ID set in search loop

This commit is contained in:
Adriane Boyd 2019-09-21 15:57:38 +02:00
parent 3a4e1f5ca7
commit c38c330585

View File

@ -192,8 +192,9 @@ cdef class PhraseMatcher:
# if end is present in current_dict
if self._terminal in current_dict or token in current_dict:
if self._terminal in current_dict:
ent_id = current_dict[self._terminal]
matches.append((self.vocab.strings[ent_id], start, idx))
ent_ids = current_dict[self._terminal]
for ent_id in ent_ids:
matches.append((self.vocab.strings[ent_id], start, idx))
# look for longer sequences from this position
if token in current_dict: