textbook-analysis icon indicating copy to clipboard operation
textbook-analysis copied to clipboard

get_descriptors.py refering before assignment problem

Open ValleSell opened this issue 4 years ago • 1 comments

https://github.com/ddemszky/textbook-analysis/blob/35a5b5cfe60516394981ff231739776d2b028450/get_descriptors.py#L129

This is the first time I report something in GitHub, so I hope I am doing it right.

I think line 129 outfile = codecs.open(os.path.join(args.output_dir, 'people_descriptors.csv'), 'w', encoding='utf-8') should be ahead of the for loop (line 126) and the second for-loop (line 130) should be indented because otherwise the variable res is referenced before assignment.

Thank you very much for putting it all in GitHub. I am learning a lot!

ValleSell avatar Jul 01 '21 18:07 ValleSell

Hi Valle! Thanks for flagging this! I'll fix this problem shortly. :) Glad you have found this toolkit helpful!

ddemszky avatar Jul 12 '21 22:07 ddemszky