openeventdata / UniversalPetrarch

Language-agnostic political event coding using universal dependencies
MIT License
18 stars 9 forks source link

Error on PETR.UnitTest #9

Closed ahalterman closed 6 years ago

ahalterman commented 6 years ago

I get an error when running on the UnitTest using the parsed document that comes with the repo. When I run

python2 petrarch_ud.py batch -i data/text/PETR.UnitTest.records.parsing_parsed_udpipe_2.0.xml -o output.txt

I get this error:

Traceback (most recent call last):
  File "petrarch_ud.py", line 409, in <module>
    main()
  File "petrarch_ud.py", line 71, in main
    run(paths, out , True)  ## <===
  File "petrarch_ud.py", line 402, in run
    events = PETRreader.read_xml_input(filepaths, s_parsed)
  File "/Users/ahalterman/MIT/NSF_RIDIR/UniversalPetrarch/UniversalPetrarch/PETRreader.py", line 2325, in read_xml_input
    holding[entry_id]['sents'][sent_id] = sent_dict
UnboundLocalError: local variable 'sent_id' referenced before assignment
JingL1014 commented 6 years ago

I think the reason is that the format of UnitTest is not compatible with the required format of PETRARCH. I will upload another version of UnitTest with compatible format.

PTB-OEDA commented 6 years ago

This needs to be fixed asap so we will be able to test the Spanish and Arabic....

On Oct 31, 2017 22:21, "JingL1014" notifications@github.com wrote:

I think the reason is that the format of UnitTest is not compatible with the required format of PETRARCH. I will upload another version of UnitTest with compatible format.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openeventdata/UniversalPetrarch/issues/9#issuecomment-340967626, or mute the thread https://github.com/notifications/unsubscribe-auth/AJrP1lNSMH9Z7I0E-CT4TdWi7N8ElpqJks5sx-OngaJpZM4QLrZX .