Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixpetrarch2 #5

Merged
merged 2 commits into from
Jul 9, 2019
Merged

Fixpetrarch2 #5

merged 2 commits into from
Jul 9, 2019

Conversation

benradford
Copy link
Contributor

@benradford benradford commented Jul 9, 2019

I have fixed hypnos such that it builds and works despite underlying formatting issues in petrarch2. Neither the petrarch2 or corenlp sub-containers are modified.

Hypnos with Petrarch2 was breaking (see #4 (comment)). This was due, in part, to the following remediated errors:

  • Dictionaries failed to load in Petrarch2
  • Petrarch2 output dictionary fields were poorly formed (tuple keys) that caused json.dumps to fail.
  • Petrarch2 function _format_parsed_str wasn't being called prior to do_coding.

Hypnos docker should now build properly and the example code works properly. I changed the example in the readme because Petrarch2 was not identifying events in the previous example. However, the examples given in the Petrarch2 unit tests work as expected.

The output format is slightly modified to correct for Petrarch2's poorly formatted output, but I anticipate that it will be backwards compatible with the previous output format for all (at least most) applications.

…, moved petrarch 2 parse format fixer into hypnos app.py
Example taken from Petrarch 2 unit tests. The old example does not produce an event in Petrarch 2.
@ahalterman ahalterman merged commit f9822ab into openeventdata:master Jul 9, 2019
@ahalterman
Copy link
Member

It's alive!!

Wow, great work @benradford.

@benradford benradford deleted the fixpetrarch2 branch July 10, 2019 16:39
@benradford benradford restored the fixpetrarch2 branch July 10, 2019 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants