<jupyter_start><jupyter_text><jupyter_code>test_str="xxup copy of course appear of course or half - dressed on his gf ill cross ! i was unemployed vans - land through the smallest shoes leave"

for x in test_str.split():
  print (f'{x}')<jupyter_output>xxup
copy
of
course
appear
of
course
or
half
-
dressed
on
his
gf
ill
cross
!
i
was
unemployed
vans
-
land
through
the
smallest
shoes
leave<jupyter_text>xxup is a token which mean the next word should be uppercased.<jupyter_code>pieces = test_str.split()
for idx,val in enumerate(pieces):
  print(f'{idx}:{val}')
def un_xxup(str):
  pieces = test_str.split()
  for index,value in enumerate(pieces):
    if value == 'xxup':
      pieces[index+1] = pieces[index+1].capitalize()
      del pieces[index]
  return " ".join(pieces)
un_xxup(test_str)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10666666666666667, 'fraction_numerical': 0.0024242424242424242, 'mean_word_length': 4.9855072463768115, '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': '667768', 'license': 'MIT', 'n_tokens_mistral': 317, 'n_tokens_neox': 305, 'n_words': 90, 'path': 'untoken.ipynb', 'repo_name': 'gdoteof/DiscordChatExporter', 'size': '825'}