Skip to content

fix xml parsing issue when there is only one sentence in the result #13

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dnc1994
Copy link

@dnc1994 dnc1994 commented Oct 24, 2015

When there is only one sentence in the input, document[u'sentences'][u'sentence'] returns a OrderedDict instead of a list, thus causing a KeyError when trying to indexing through it.
This bug can fixed by simply putting raw_sent_list into a list when such case is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant