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

Fix loading from json when parsed_sentences is None #77

Merged
merged 2 commits into from
Sep 12, 2017
Merged

Fix loading from json when parsed_sentences is None #77

merged 2 commits into from
Sep 12, 2017

Conversation

MatthewScholefield
Copy link
Contributor

When saving with retain_original=False, parsed_sentences is set to None. When loading, however, it errors. out. This allows loading with retain_original=False, which will be passed to the constructor and not error out.

@coveralls
Copy link

coveralls commented Sep 9, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 0ee73ef on MatthewScholefield:fix-no-parsed-sent-saving into 4060cce on jsvine:master.

@jsvine
Copy link
Owner

jsvine commented Sep 11, 2017

Big thanks for catching this, Matthew! My gut instinct, in this scenario, would be to handle this in a slightly different way: Rather than passing **kwargs, .from_dict(...) can safely assume that if parsed_sentences is not passed then retain_original is False.

What do you think?

@MatthewScholefield
Copy link
Contributor Author

MatthewScholefield commented Sep 11, 2017 via email

@MatthewScholefield
Copy link
Contributor Author

@jsvine OK, it's changed.

@coveralls
Copy link

coveralls commented Sep 11, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling dcafe08 on MatthewScholefield:fix-no-parsed-sent-saving into 4060cce on jsvine:master.

@jsvine jsvine merged commit eed8f5e into jsvine:master Sep 12, 2017
jsvine added a commit that referenced this pull request Sep 12, 2017
@jsvine
Copy link
Owner

jsvine commented Sep 12, 2017

Thanks! Merged, and now available in v0.6.2.

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.

None yet

3 participants