diff --git a/arekit/common/data/input/providers/rows/samples.py b/arekit/common/data/input/providers/rows/samples.py index cf90ea2e..7c0f745f 100644 --- a/arekit/common/data/input/providers/rows/samples.py +++ b/arekit/common/data/input/providers/rows/samples.py @@ -87,7 +87,7 @@ def __assign_value(column, value): # Entity indicies from the related context. entities = list(filter(lambda term: isinstance(term, Entity), sentence_terms)) - entity_inds = [i for i, t in sentence_terms if isinstance(t, Entity)] + entity_inds = [str(i) for i, t in enumerate(sentence_terms) if isinstance(t, Entity)] row[const.ENTITY_VALUES] = ",".join([e.Value.replace(',', '') for e in entities]) row[const.ENTITY_TYPES] = ",".join([e.Type.replace(',', '') for e in entities]) row[const.ENTITIES] = ",".join(entity_inds)