<jupyter_start><jupyter_text>Caso de matriz espaçamento fixo 5x7<jupyter_code>txt = '0123'
FontDft = np.array([[0,0,1,1,1,0,0], # 0
                    [0,1,0,0,1,1,0],
                    [0,1,0,0,1,1,0],
                    [0,1,0,1,0,1,0],
                    [0,1,1,0,0,1,0],
                    [0,1,1,0,0,1,0],
                    [0,0,1,1,1,0,0],
                    [0,0,0,1,0,0,0], # 1
                    [0,0,1,1,0,0,0],
                    [0,0,0,1,0,0,0],
                    [0,0,0,1,0,0,0],
                    [0,0,0,1,0,0,0],
                    [0,0,0,1,0,0,0],
                    [0,0,1,1,1,0,0],
                    [0,0,1,1,1,0,0], # 2
                    [0,1,0,0,0,1,0],
                    [0,0,0,0,0,1,0],
                    [0,0,1,1,1,0,0],
                    [0,1,0,0,0,0,0],
                    [0,1,0,0,0,0,0],
                    [0,1,1,1,1,1,0],
                    [0,0,1,1,1,0,0], # 3
                    [0,1,0,0,0,1,0],
                    [0,0,0,0,1,0,0],
                    [0,0,0,1,1,0,0],
                    [0,0,0,0,0,1,0],
                    [0,1,0,0,0,1,0],
                    [0,0,1,1,1,0,0],
                   ],'bool')
FIRST_CHAR =ord('0')
LAST_CHAR  = ord('3')
N_CHARS    = 1 + LAST_CHAR - FIRST_CHAR
WIDTH_DFT  = 7
HEIGHT_DFT = 7

FontDft = np.reshape(FontDft,(HEIGHT_DFT * N_CHARS, WIDTH_DFT))
y = ()
for c in txt:
  i = ord(c) - FIRST_CHAR
  assert i < N_CHARS,'iatext, code not allowed (%s)' % c
  if len(y) == 0:
    y = FontDft[i*HEIGHT_DFT:(i+1)*HEIGHT_DFT,:]
  else:
    y = MT.iaconcat('w',y,FontDft[i*HEIGHT_DFT:(i+1)*HEIGHT_DFT,:])

y.shape
Image.fromarray(MT.iabshow(y,y).astype('uint8')*255)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21800947867298578, 'fraction_numerical': 0.12914691943127962, 'mean_word_length': 1.423242467718795, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '512244', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 839, 'n_tokens_neox': 785, 'n_words': 83, 'path': 'dtext.ipynb', 'repo_name': 'robertoalotufo/ia870p3', 'size': '1688'}