<jupyter_start><jupyter_text>Exploring Unicode<jupyter_code>from unicodedata import name
name('A')
name('ç')
from sys import maxunicode
maxunicode
import unicodedata

for code in range(32, 10000):
    char = chr(code)
    name = unicodedata.name(char, '')
    if name:
        print(f'U+{code:04X}', char, name, sep='\t')

for code in range(32, maxunicode):
    char = chr(code)
    name = ' ' + unicodedata.name(char, '') + ' '
    if ' CAT ' in name:
        print(f'U+{code:04X}', char, name, sep='\t')
for code in range(32, maxunicode):
    char = chr(code)
    name = unicodedata.name(char, '')
    if name:
        words = name.split()
        if 'CAT' in words:
            print(f'U+{code:04X}', char, name, sep='\t')<jupyter_output>U+A2B6	ꊶ	YI SYLLABLE CAT
U+CC41	챁	HANGUL SYLLABLE CAT
U+101EC	𐇬	PHAISTOS DISC SIGN CAT
U+1F408	🐈	CAT
U+1F431	🐱	CAT FACE
U+1F638	😸	GRINNING CAT FACE WITH SMILING EYES
U+1F639	😹	CAT FACE WITH TEARS OF JOY
U+1F63A	😺	SMILING CAT FACE WITH OPEN MOUTH
U+1F63B	😻	SMILING CAT FACE WITH HEART-SHAPED EYES
U+1F63C	😼	CAT FACE WITH WRY SMILE
U+1F63D	😽	KISSING CAT FACE WITH CLOSED EYES
U+1F63E	😾	POUTING CAT FACE
U+1F63F	😿	CRYING CAT FACE
U+1F640	🙀	WEARY CAT FACE<jupyter_text>Characters used in Unicode character names<jupyter_code>used_chars = set()

for code in range(32, maxunicode):
    char = chr(code)
    name = unicodedata.name(char, '')
    if name:
        used_chars.update(list(name))
        
print(' '.join(sorted(used_chars)))
import string
dir(string)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12442698100851342, 'fraction_numerical': 0.04191224623444663, 'mean_word_length': 3.7899686520376177, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '576411', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 735, 'n_tokens_neox': 663, 'n_words': 174, 'path': 'lab/exploring_unicode.ipynb', 'repo_name': 'ramalho/mojifinder', 'size': '1527'}