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 support for non-English texts #49

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

Conversation

omid-jf
Copy link

@omid-jf omid-jf commented Mar 29, 2021

The encode('ascii', 'ignore').decode('ascii') strategy does not work for non-English characters. Since emoji regex patterns already exist in defines.py, regex substitute is sufficient to remove the emojis.

Fixes #47 and #48

The encode('ascii', 'ignore').decode('ascii') strategy does not work for non-English characters. Since emoji regex patterns already exist in defines.py, regex substitute is sufficient to remove the emojis.
@omid-jf
Copy link
Author

omid-jf commented Mar 29, 2021

The pattern defined in defines.py does not contain newer emojis though and needs to be updated.
emoji.get_emoji_regexp() from https://pypi.org/project/emoji can be used instead as well.

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.

Encoding issue with non-English text
1 participant