Extract File Name of the file parsed by batch parser in corenlp

Issue #17 new
Kahini Wadhawan created an issue

Is there a way to extract file name of the files parsed by batch parser utility in corenlp? I am just trying to extract file name of the file being parsed.

The code in the documentation says it has 'file_name' but its not there when you parse parsed object.

from corenlp import batch_parse corenlp_dir = "stanford-corenlp-full-2014-08-27/" raw_text_directory = "sample_raw_text/" parsed = batch_parse(raw_text_directory, corenlp_dir) # It returns a generator object print parsed #=> [{'coref': ..., 'sentences': ..., 'file_name': 'new_sample.txt'}]