Skip to content

Commit

Permalink
Add support for Multi-person skintones #204
Browse files Browse the repository at this point in the history
The logic from demojize() is moved to two separate function tokenize and filter_tokens in a new file emoji/tokenizer.py
Also the logic for the search tree is moved to that file.

A new public function analyze() is available, that supports the multi-person skintones

The handling of the multi-person skintones can be controlled by the new `emoji.config` class, which is a static class that works as a module-wide configuration.
  • Loading branch information
cvzi committed Jun 6, 2023
1 parent 839fd34 commit 00a74b4
Show file tree
Hide file tree
Showing 3 changed files with 491 additions and 166 deletions.
9 changes: 4 additions & 5 deletions emoji/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# -*- coding: UTF-8 -*-


"""
emoji for Python
~~~~~~~~~~~~~~~~
Expand All @@ -20,8 +17,10 @@

__all__ = [
# emoji.core
'emojize', 'demojize', 'emoji_count', 'emoji_list',
'distinct_emoji_list', 'replace_emoji', 'version', 'is_emoji',
'emojize', 'demojize', 'analyze', 'config',
'emoji_list', 'distinct_emoji_list', 'emoji_count',
'replace_emoji', 'is_emoji', 'version',
'Token', 'EmojiMatch', 'EmojiMatchZWJ', 'EmojiMatchZWJNonRGI',
# emoji.unicode_codes
'EMOJI_DATA', 'STATUS', 'LANGUAGES',
]
Expand Down
Loading

0 comments on commit 00a74b4

Please sign in to comment.