Skip to content

Commit

Permalink
#337 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Jun 16, 2022
1 parent d754221 commit 85f4c42
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions arekit/common/news/parsed/providers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ def Name(self):
def init_parsed_news(self, parsed_news):
assert(isinstance(parsed_news, ParsedNews))
self._doc_entities = {}
for doc_id, entity in enumerate(parsed_news.iter_entities()):
self._doc_entities[doc_id] = DocumentEntity(id_in_doc=doc_id,
value=entity.Value,
e_type=entity.Type,
group_index=entity.GroupIndex)
for entity in parsed_news.iter_entities():
assert(entity.ID not in self._doc_entities)
self._doc_entities[entity.ID] = DocumentEntity(id_in_doc=entity.ID,
value=entity.Value,
e_type=entity.Type,
group_index=entity.GroupIndex)

0 comments on commit 85f4c42

Please sign in to comment.