def iob2json(input_data, n_sents=<NUM_LIT:10>, *args, **kwargs):
docs = []<EOL>for group in minibatch(docs, n_sents):<EOL><INDENT>group = list(group)<EOL>first = group.pop(<NUM_LIT:0>)<EOL>to_extend = first["<STR_LIT>"][<NUM_LIT:0>]["<STR_LIT>"]<EOL>for sent in group[<NUM_LIT:1>:]:<EOL><INDENT>to_extend.extend(sent["<STR_LIT>"][<NUM_LIT:0>]["<STR_LIT>"])<EOL><DEDENT>docs.append(first)<EOL><DEDENT>return docs<EOL>
Convert IOB files into JSON format for use with train cli.