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

Dont fail completely on no prep text. #47

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

Conversation

reisner
Copy link

@reisner reisner commented Mar 14, 2018

If a file has no text after tokenizing, don't fail catastrophically. Print out a warning instead.

Previously:

Prepping temp//106.txt
Error: length(text) == 1 is not TRUE
>

Now:

Prepping temp//106.txt
Warning: No text to prep in temp//106.txt
Prepping temp//107.txt
...

This was failing on a file I was trying to run on that only contained emojis. These were removed by skip_word_none = TRUE in stri_split_boundaries. Rather than change that code, I figure a warning would be a better solution.

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.

1 participant