Issue #3 resolved

Error in batch processing example

Anonymous created an issue

Hi, Just downloaded package and am trying to get the batch_process demo to work. Copied the batch process code from the README into a new file (huh.py) and ran it. (Changed the path for the Stanford Core NLP directory to match my filesystem).

The parse works, but there is an error after the parse and before the batch_parse() returns:

Total time for StanfordCoreNLP pipeline: 89.6 sec.
Traceback (most recent call last):
  File "huh.py", line 4, in <module>
  parsed = batch_parse(raw_text_directory, corenlp_dir)  # It returns a generator object
 File "/Users/danielr/Documents/src/corenlp-python/corenlp/corenlp.py", line 445, in batch_parse
 return parse_xml_output(input_folder, corenlp_path, memory)
File "/Users/danielr/Documents/src/corenlp-python/corenlp/corenlp.py", line 297, in parse_xml_output
result.append(parse_parser_xml_results(xml.read(), file_name))
File "/Users/danielr/Documents/src/corenlp-python/corenlp/corenlp.py", line 252, in   parse_parser_xml_results
for j in xrange(len(raw_sent_list)) ]
AttributeError: 'list' object has no attribute 'values'

I'll start looking into it but you may get their first.

Comments (3)

  1. Log in to comment