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

[Sentence] Fix infinite loop bug #1030

Merged
merged 2 commits into from
Aug 26, 2019
Merged

Conversation

pommedeterresautee
Copy link
Contributor

@pommedeterresautee pommedeterresautee commented Aug 24, 2019

Sometimes, start_pos in Token is set to None.
This is for instance the case when loading a Corpus in columnar format.

In those cases while t.start_pos != pos from to_original_text method is always True.
This fix manages this case.

Another solution would be to just throw an Exception. Let me know what you prefer. In this case it may be good to forbid to have start_pos being None in any case and to rewrite Corpus class. May be to put in another PR

@alanakbik
Copy link
Collaborator

👍

@alanakbik
Copy link
Collaborator

thanks for fixing this!

@alanakbik alanakbik merged commit ac21e31 into flairNLP:master Aug 26, 2019
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

2 participants