File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -246,14 +246,16 @@ def ner_replace(self):
246246 ner = self .ner ()
247247 data_out = []
248248 for sg_data , sg_ner in zip (self .data , ner ):
249+ sentence_group_out = []
249250 for alt_data , alt_ner in zip (sg_data .alternatives , sg_ner ):
250251 # Replace the text in the sentence with the named entities
251252 new_sentence = alt_data .sentence
252253 for graph in alt_ner :
253254 for entity in graph :
254255 new_sentence = new_sentence .replace (
255256 entity ['entity' ], entity ['ner' ][0 ]['label' ])
256- data_out .append (new_sentence )
257+ sentence_group_out .append (new_sentence )
258+ data_out .append (sentence_group_out )
257259 return data_out
258260
259261
Original file line number Diff line number Diff line change 1- __version_info__ = ('0' , '0' , '5 ' )
1+ __version_info__ = ('0' , '0' , '6 ' )
22__version__ = '.' .join (__version_info__ )
You can’t perform that action at this time.
0 commit comments